Skip to content

1D Arrangement on curve - #9608

Open
efifogel wants to merge 88 commits into
CGAL:mainfrom
efifogel:Arrangement_on_curve_1-efif
Open

1D Arrangement on curve#9608
efifogel wants to merge 88 commits into
CGAL:mainfrom
efifogel:Arrangement_on_curve_1-efif

Conversation

@efifogel

@efifogel efifogel commented Aug 21, 2026

Copy link
Copy Markdown
Member

Summary of Changes

This new package is designed to construct, manipulate, and query one-dimensional arrangements embedded along continuous curves. While it recycles some old code, it uses newer idioms, such as property maps and C++17-style metaprogramming. The main class template is called Arrangement_on_curve_1. I also have 2 use cases:

  1. It can be used to solve the following problem: Given a collection of 3D meshes and a curve c in 3D, find the maximal arcs that overlap with c, such that each arc does not intersect any mesh in its interior.
  2. Compute the lower or upper envelope of 2D curves.

We have a package called "2D Envelopes", already in CGAL, which computes the lower or upper envelopes of 2D curves. I've reimplemented the code of this package using the new data structure Arrangement_on_curve_1. I also created a benchmark to ensure that there is no performance degradation. The branch, at this point, contains the new code. However, I may move it to a separate branch and introduce it in a separate PR after this one is fully merged.

The development is complete (code, tests, examples, and documentation).

Release Management

  • Affected package(s): Arrangement_on_curve_1
  • Issue(s) solved (if any):
  • Feature (if any): Features/1D Arrangements on Curves
  • Link to compiled documentation: The branch contains the full documentation.
  • License and copyright ownership: TAU

Comment thread Arrangement_on_curve_1/test/Arrangement_on_curve_1/CMakeLists.txt Outdated
@afabri

afabri commented Aug 24, 2026

Copy link
Copy Markdown
Member

/build:v0

@github-actions

Copy link
Copy Markdown

The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/9608/v0/Manual/index.html

Comment thread Arrangement_on_curve_1/doc/Arrangement_on_curve_1/PackageDescription.txt Outdated
/*!
\addtogroup PkgArrangementOnCurve1Ref
\cgalPkgDescriptionBegin{1D Arrangements,PkgArrangementOnCurve1}
\cgalPkgPicture{semicircle.png}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The teaser is too large.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I find it surprising to see a circular arc, while this seems not to be provided as functionality.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Can you suggest how ot shorten it?
  2. 1D arrangements on circular arcs are supported. As a matter of fact, the example arr_on_circle_segment.cpp demonstrates this. I added "; see Arrangement_on_curve_1/arr_on_circle_segment.cpp" near the figure.


Given a set \f$\mathcal{P}\f$ of points on a curve, the <I>arrangement</I> \f$ {\mathcal A}({\mathcal P})\f$ is the subdivision of the curve induced by the points in \f$\mathcal{P}\f$ into maximally connected cells. The cells can be \f$0\f$-dimensional (<I>vertices</I>) or \f$1\f$-dimensional (<I>edges</I>).

The class `Arrangement_on_curve_1<Traits>` encapsulates a data structure that maintains arrangements of points. It comes with a variety of algorithms that operate on 1D arrangements, such as point-location queries and overlay computations, which are implemented as peripheral classes or as free (global) functions.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The class `Arrangement_on_curve_1<Traits>` encapsulates a data structure that maintains arrangements of points. It comes with a variety of algorithms that operate on 1D arrangements, such as point-location queries and overlay computations, which are implemented as peripheral classes or as free (global) functions.
The class `CGAL::Arrangement_on_curve_1<Traits>` encapsulates a data structure that maintains arrangements of points. It comes with a variety of algorithms that operate on 1D arrangements, such as point-location queries and overlay computations, which are implemented as peripheral classes or as free (global) functions.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All free functions and types are defined under the namespace CGAL::Arrangement_on_curve_1. I added an explicit sentence to the User Manual stating this.

Comment thread Arrangement_on_curve_1/doc/Arrangement_on_curve_1/Concepts/AocTraits_1.h Outdated
Comment thread Arrangement_on_curve_1/doc/Arrangement_on_curve_1/CGAL/insert.h Outdated
Comment thread Arrangement_on_curve_1/doc/Arrangement_on_curve_1/CGAL/Ft_traits_1.h Outdated
Comment thread Arrangement_on_curve_1/doc/Arrangement_on_curve_1/Concepts/ArrangementOnCurve_1.h Outdated
Comment thread Arrangement_on_curve_1/examples/Arrangement_on_curve_1/overlay_line_3.cpp Outdated
- `CGAL::insert()`
- `CGAL::locate()`
- `CGAL::overlay()`
- `CGAL::IO::read()`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link goes to Arrangement_on_surface.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way there seem to be mistakes in the documentation of the concept AosInputFormatter. The default constructor does not have the right name.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed the links (I think).
Regarding the mistakes in osInputFormatter, you are correct. As a matter of fact, the default constructor should not be listed. Instead, the page should include the statement:
\cgalRefines{DefaultConstructible}
The second constructor name should be fixed.
I'll fix it in a separate PR.

@efifogel

Copy link
Copy Markdown
Member Author

Andreas, thanks for reviewing it.
I think that I've addressed all comments, except for teaser being too large, as I wasn't sure in what way.

@afabri

afabri commented Aug 25, 2026

Copy link
Copy Markdown
Member

These pictures are all 120x120 I think

@efifogel

efifogel commented Aug 25, 2026 via email

Copy link
Copy Markdown
Member Author

@afabri

afabri commented Aug 27, 2026

Copy link
Copy Markdown
Member

/force-build:v0

@github-actions

Copy link
Copy Markdown

The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/9608/v0/Manual/index.html

@@ -0,0 +1,124 @@
// Copyright (c) 2026 Tel-Aviv University (Israel).
// All rights reserved.
// This file is part of CGAL (www.cgal.org).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// This file is part of CGAL (www.cgal.org).
// This file is part of CGAL (www.cgal.org).
// $URL$
// $Id$

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must be added in several other header files as reported by the CI

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tags are historical artifacts left over from the SVN days.
I don't mind adding them, but it would be better to remove them from all files instead.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They get filled by scripts for the released tar balls, so they are used and useful.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants