-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Ss2 do intersect efif #9303
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
base: main
Are you sure you want to change the base?
Ss2 do intersect efif #9303
Conversation
b277e45 to
ae33c8d
Compare
Arrangement_on_surface_2/include/CGAL/Arrangement_2/do_segments_intersect.h
Outdated
Show resolved
Hide resolved
| template <typename Point_2, typename Traits> | ||
| bool do_closed_segment_intersect(const Point_2& l1, const Point_2& r1, const Point_2& l2, const Point_2& r2, | ||
| const Traits& traits) { | ||
| auto cmpare_xy = traits.compare_xy_2_object(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the missing letter o on purpose?
Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h
Outdated
Show resolved
Hide resolved
| cmake_minimum_required(VERSION 3.12...3.31) | ||
| project(do_intersect) | ||
| find_package(Boost CONFIG ${BOOST_MIN_VERSION} REQUIRED COMPONENTS program_options) | ||
| find_package(CGAL REQUIRED COMPONENTS Core OPTIONAL_COMPONENTS Qt6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| find_package(CGAL REQUIRED COMPONENTS Core OPTIONAL_COMPONENTS Qt6) | |
| find_package(CGAL OPTIONAL_COMPONENTS Qt6) |
because Core is no longer conditional
| /* A compatible output iterator that accepts a std::variant and dispatches its | ||
| * alternatives to different sinks via a visitor. | ||
| * | ||
| * Designed to replace boost::function_output_iterator when the algorithm emits | ||
| * heterogeneous output (e.g., `Point_2` or `X_monotone_curve_2`). | ||
| * | ||
| * Many CGAL concepts (e.g., Make_x_monotone_2) require an operation that writes | ||
| * results to an `OutputIterator` whose value type is: | ||
| * | ||
| * `std::variant<T1, T2, ...>` | ||
| * | ||
| * However: | ||
| * 1. `boost::function_output_iterator` receives one type | ||
| * 2. Visitors (operator()) are invoked after assignment | ||
| * 3. CGAL freely copies, assigns, and default-constructs output iterators | ||
| * `variant_output_iterator` bridges this gap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /* A compatible output iterator that accepts a std::variant and dispatches its | |
| * alternatives to different sinks via a visitor. | |
| * | |
| * Designed to replace boost::function_output_iterator when the algorithm emits | |
| * heterogeneous output (e.g., `Point_2` or `X_monotone_curve_2`). | |
| * | |
| * Many CGAL concepts (e.g., Make_x_monotone_2) require an operation that writes | |
| * results to an `OutputIterator` whose value type is: | |
| * | |
| * `std::variant<T1, T2, ...>` | |
| * | |
| * However: | |
| * 1. `boost::function_output_iterator` receives one type | |
| * 2. Visitors (operator()) are invoked after assignment | |
| * 3. CGAL freely copies, assigns, and default-constructs output iterators | |
| * `variant_output_iterator` bridges this gap. | |
| /* A compatible output iterator that accepts a `std::variant` and dispatches its | |
| * alternatives to different sinks via a visitor. | |
| * | |
| * Designed to replace `boost::function_output_iterator` when the algorithm emits | |
| * heterogeneous output (e.g., `Point_2` or `X_monotone_curve_2`). | |
| * | |
| * Many \cgal concepts (e.g., `Make_x_monotone_2`) require an operation that writes | |
| * results to an `OutputIterator` whose value type is: | |
| * | |
| * `std::variant<T1, T2, ...>` | |
| * | |
| * However: | |
| * 1. `boost::function_output_iterator` receives one type | |
| * 2. Visitors (operator()) are invoked after assignment | |
| * 3. \cgal freely copies, assigns, and default-constructs output iterators | |
| * `variant_output_iterator` bridges this gap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make_x_monotone_2 is not a concept. CamelCase ?
…ts", which reflects the true semantics of the parameter
… Ss2-do_intersect-efif
|
Yes it is; fixed.
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
…On Thu, 5 Feb 2026 at 14:24, Andreas Fabri ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In Surface_sweep_2/include/CGAL/variant_output_iterator.h
<#9303 (comment)>:
> +/* A compatible output iterator that accepts a std::variant and dispatches its
+ * alternatives to different sinks via a visitor.
+ *
+ * Designed to replace boost::function_output_iterator when the algorithm emits
+ * heterogeneous output (e.g., `Point_2` or `X_monotone_curve_2`).
+ *
+ * Many CGAL concepts (e.g., Make_x_monotone_2) require an operation that writes
+ * results to an `OutputIterator` whose value type is:
+ *
+ * `std::variant<T1, T2, ...>`
+ *
+ * However:
+ * 1. `boost::function_output_iterator` receives one type
+ * 2. Visitors (operator()) are invoked after assignment
+ * 3. CGAL freely copies, assigns, and default-constructs output iterators
+ * `variant_output_iterator` bridges this gap.
Make_x_monotone_2 is not a concept. CamelCase ?
—
Reply to this email directly, view it on GitHub
<#9303 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVBNOD6VA4OTVAK7J4FVXD4KMY6LAVCNFSM6AAAAACTJBWSXKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTONJWG44TINJQHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
Added the missing *backticks*
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
…On Thu, 5 Feb 2026 at 14:23, Andreas Fabri ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In Surface_sweep_2/include/CGAL/variant_output_iterator.h
<#9303 (comment)>:
> +/* A compatible output iterator that accepts a std::variant and dispatches its
+ * alternatives to different sinks via a visitor.
+ *
+ * Designed to replace boost::function_output_iterator when the algorithm emits
+ * heterogeneous output (e.g., `Point_2` or `X_monotone_curve_2`).
+ *
+ * Many CGAL concepts (e.g., Make_x_monotone_2) require an operation that writes
+ * results to an `OutputIterator` whose value type is:
+ *
+ * `std::variant<T1, T2, ...>`
+ *
+ * However:
+ * 1. `boost::function_output_iterator` receives one type
+ * 2. Visitors (operator()) are invoked after assignment
+ * 3. CGAL freely copies, assigns, and default-constructs output iterators
+ * `variant_output_iterator` bridges this gap.
⬇️ Suggested change
-/* A compatible output iterator that accepts a std::variant and dispatches its
- * alternatives to different sinks via a visitor.
- *
- * Designed to replace boost::function_output_iterator when the algorithm emits
- * heterogeneous output (e.g., `Point_2` or `X_monotone_curve_2`).
- *
- * Many CGAL concepts (e.g., Make_x_monotone_2) require an operation that writes
- * results to an `OutputIterator` whose value type is:
- *
- * `std::variant<T1, T2, ...>`
- *
- * However:
- * 1. `boost::function_output_iterator` receives one type
- * 2. Visitors (operator()) are invoked after assignment
- * 3. CGAL freely copies, assigns, and default-constructs output iterators
- * `variant_output_iterator` bridges this gap.
+/* A compatible output iterator that accepts a `std::variant` and dispatches its
+ * alternatives to different sinks via a visitor.
+ *
+ * Designed to replace `boost::function_output_iterator` when the algorithm emits
+ * heterogeneous output (e.g., `Point_2` or `X_monotone_curve_2`).
+ *
+ * Many \cgal concepts (e.g., `Make_x_monotone_2`) require an operation that writes
+ * results to an `OutputIterator` whose value type is:
+ *
+ * `std::variant<T1, T2, ...>`
+ *
+ * However:
+ * 1. `boost::function_output_iterator` receives one type
+ * 2. Visitors (operator()) are invoked after assignment
+ * 3. \cgal freely copies, assigns, and default-constructs output iterators
+ * `variant_output_iterator` bridges this gap.
—
Reply to this email directly, view it on GitHub
<#9303 (review)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVBNOD4BHFP54DRYYBFHGT4KMY4DAVCNFSM6AAAAACTJBWSXKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTONJWG44TEMJXG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
done
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
…On Thu, 5 Feb 2026 at 14:21, Andreas Fabri ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In
Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/CMakeLists.txt
<#9303 (comment)>:
> @@ -0,0 +1,6 @@
+cmake_minimum_required(VERSION 3.12...3.31)
+project(do_intersect)
+find_package(Boost CONFIG ${BOOST_MIN_VERSION} REQUIRED COMPONENTS program_options)
+find_package(CGAL REQUIRED COMPONENTS Core OPTIONAL_COMPONENTS Qt6)
⬇️ Suggested change
-find_package(CGAL REQUIRED COMPONENTS Core OPTIONAL_COMPONENTS Qt6)
+find_package(CGAL OPTIONAL_COMPONENTS Qt6)
because Core is no longer conditional
—
Reply to this email directly, view it on GitHub
<#9303 (review)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVBNOHLBPDUZCOSGMB3P3L4KMYT3AVCNFSM6AAAAACTJBWSXKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTONJWG44DGMZRGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
No, I fixed it
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
…On Thu, 5 Feb 2026 at 14:13, Andreas Fabri ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In
Arrangement_on_surface_2/include/CGAL/Arrangement_2/do_segments_intersect.h
<#9303 (comment)>:
> +
+#include <CGAL/license/Arrangement_on_surface_2.h>
+
+/*! \file Intersection detection functions.
+ */
+
+namespace CGAL {
+namespace Aos_2 {
+namespace internal {
+
+// Specialized do_intersect with several tests skipped because at
+// this point, we already know the order of points
+template <typename Point_2, typename Traits>
+bool do_closed_segment_intersect(const Point_2& l1, const Point_2& r1, const Point_2& l2, const Point_2& r2,
+ const Traits& traits) {
+ auto cmpare_xy = traits.compare_xy_2_object();
Is the missing letter o on purpose?
—
Reply to this email directly, view it on GitHub
<#9303 (review)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVBNODHNFHPXGVEA3SX3SD4KMXXNAVCNFSM6AAAAACTJBWSXKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTONJWG42DCMJYGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
Several runtime errors in CGAL-6.2-Ic-106 |
…loading (some compilers complaine).
|
I fixed them
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
…On Tue, 10 Feb 2026 at 09:58, Sebastien Loriot ***@***.***> wrote:
*sloriot* left a comment (CGAL/cgal#9303)
<#9303 (comment)>
Several runtime errors in CGAL-6.2-Ic-106
—
Reply to this email directly, view it on GitHub
<#9303 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVBNOBNASVVAHIFLKFMIED4LGFH7AVCNFSM6AAAAACTJBWSXKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTQNZVHE3TAMJRG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
I also fixed the conflict in CHANGES.md (and fixed the content of my
specific change...)
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
…On Tue, 10 Feb 2026 at 10:29, Efi Fogel ***@***.***> wrote:
I fixed them
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
On Tue, 10 Feb 2026 at 09:58, Sebastien Loriot ***@***.***>
wrote:
> *sloriot* left a comment (CGAL/cgal#9303)
> <#9303 (comment)>
>
> Several runtime errors in CGAL-6.2-Ic-106
>
> —
> Reply to this email directly, view it on GitHub
> <#9303 (comment)>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABVBNOBNASVVAHIFLKFMIED4LGFH7AVCNFSM6AAAAACTJBWSXKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTQNZVHE3TAMJRG4>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
| * \param xc2 The second \f$x\f$-monotone curve. | ||
| * \param consider_common_endpoints indicates whether common endpoints should be counted as intersections. | ||
| * \return `true` if `consider_common_endpoints` is true and `xcv1` and `xcv2` intersect or if | ||
| * `consider_common_endpoints` is `false and at least one of the interiors of `xcv1` and `xcv2` intersect, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * `consider_common_endpoints` is `false and at least one of the interiors of `xcv1` and `xcv2` intersect, | |
| * `consider_common_endpoints` is `false` and at least one of the interiors of `xcv1` and `xcv2` intersect, |
|
Fixed
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
…On Tue, 10 Feb 2026 at 11:04, albert-github ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In
Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/AosTraits--DoIntersect_2.h
<#9303 (comment)>:
> + * \cgalHasModelsEnd
+ */
+class DoIntersect_2 {
+public:
+
+ /// \name Operations
+ /// A model of this concept must provide:
+ /// @{
+
+ /*! determines whether two \f$x\f$-monotone curves intersect.
+ *
+ * \param xc1 The first \f$x\f$-monotone curve.
+ * \param xc2 The second \f$x\f$-monotone curve.
+ * \param consider_common_endpoints indicates whether common endpoints should be counted as intersections.
+ * \return `true` if `consider_common_endpoints` is true and `xcv1` and `xcv2` intersect or if
+ * `consider_common_endpoints` is `false and at least one of the interiors of `xcv1` and `xcv2` intersect,
⬇️ Suggested change
- * `consider_common_endpoints` is `false and at least one of the interiors of `xcv1` and `xcv2` intersect,
+ * `consider_common_endpoints` is `false` and at least one of the interiors of `xcv1` and `xcv2` intersect,
—
Reply to this email directly, view it on GitHub
<#9303 (review)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVBNOHWDXZYI5MG5KNNQS34LGNIBAVCNFSM6AAAAACTJBWSXKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTONZXGY2DKNZYGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Summary of Changes
Enhanced curve-intersection detection:
x-monotone and general curvesRelease Management
TODO:
Surface_sweep_2/include/CGAL/variant_output_iterator.htoSTL_extension