Added a comment

This commit is contained in:
Efi Fogel 2024-10-08 10:59:17 +03:00
parent aab1897b7d
commit a1a29ee05e
1 changed files with 6 additions and 0 deletions

View File

@ -741,6 +741,12 @@ public:
// Add a subcurve to the saved x-monotone curve
auto update_saved_xcv = [&](const X_monotone_subcurve_2& sxcv) {
xcv_saved = true;
// We maintain the invariant that if the input curves have opposite
// directions (! consistent), the overalpping curves are directed
// left=>right. This, however, is not guaranteed by all traits for the
// subcurves. (It is guaranteed by some traits, but this is
// insufficient.) Therefore, we need to enforce it. That is, we make
// sure the subcurves are also directed left=>right in this case.
if (! consistent && (cmp_endpts(sxcv) == LARGER)) {
if (invert_ocv) {
saved_xcv.push_front(ctr_opposite(sxcv));