Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poly-geodesic arc Handling #8477

Merged
merged 13 commits into from
Oct 18, 2024
Merged

Conversation

efifogel
Copy link
Member

@efifogel efifogel commented Sep 9, 2024

Fixed handling poly-curves. Poly-curves are piecewise curves that are not necessarily linear, that is, chains of connected curves of a specific type. Most of fixes in this PR apply to code that handles poly-curves, where the curves are geodesic arcs on the sphere. Observe that polylines (piecewise linear curves) are a specific type of poly-curves.

Summary of Changes

Most of the changes are made in the file Arr_polycurve_basic_traits_2.h of the "2D Arrangements" package.
The class template Arr_polyline_traits_2 derives from Arr_polycurve_traits_2, which in turn derives from Arr_polycurve_basic_traits_2. Each class in this hierarchy adds some functionality.
They all handle poly-curves. The first handles polylines; the other two handle poly-curves. The template parameter SubcurveTraits is referred to as the subcurve traits.

  1. Fixed several bugs in the handling of poly-curves, where the curves are geodesic arcs in a sphere. In particular, the SubcurveTraits parameter was substituted by an instance of the template Arr_geodesic_arc_on_sphere_traits_2.
  2. Replaced 'typedef' with modern 'using' (in Arr_polycurve_basic_traits_2.h)
  3. Improved the inline documentation (in Arr_polycurve_basic_traits_2.h) and applied a general clean up.
  4. Fixed the return type of the functors Construct_min_vertex_2 and Construct_max_vertex_2 to be either a point by value or a point by reference depending on the sub-curve traits.
  5. Added missing Construct_point_2 functor. (This is not an important addition, because the Construct_point_2 functor of the polycurve traits simply delegates the Construct_point_2 functor of the subcurve traits; nevertheless, it was added for completion.)
  6. Fixed small problems in Arr_counting_traits_2 and Arr_tracing_traits. These two template classes are traits decorators that can be used to obtain metadata about the executions of traits functors.

Release Management

  • Affected package(s): Arrangement_on_surface_2 (also Surface_sweep_2 in a couple of places, where a specific type was replaced by 'auto' to take advantage of (4.) above.
  • Issue(s) solved (if any): NA
  • Feature/Small Feature (if any): NA
  • Link to compiled documentation (obligatory for small feature): NA
  • License and copyright ownership: TAU

Co-authored-by: Andreas Fabri <[email protected]>
@sloriot
Copy link
Member

sloriot commented Oct 18, 2024

Successfully tested in CGAL-6.0.1-Ic-351

@sloriot sloriot merged commit 1937666 into CGAL:master Oct 18, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants