Merge #741 (fix/linesweeper-line-segment-doc) into integration/linesweeper

This commit is contained in:
dotCooCoo committed 2026-11-09 14:16:04 -08:00
commit e57aa3a335
4 files changed
+13

No files matched your search

+2
View File
@@ -343,6 +343,8 @@ vendor/linesweeper/README.craft.md and vendor/linesweeper/SOURCE.json for proven
change and the files left out.
vendor/linesweeper with its upstream license files and one local patch. Its manifest names Joe Neeman
as author, and its LICENSE-MIT reads "Copyright (c) 2018 Raph Levien". See
vendor/linesweeper with its upstream license files and one local patch. Its manifest names Joe Neeman
as author, and its LICENSE-MIT reads "Copyright (c) 2018 Raph Levien". See
vendor/linesweeper/README.craft.md and vendor/linesweeper/SOURCE.json for provenance, the local patch
and the files left out.
+5
View File
@@ -305,6 +305,10 @@ local patch listed below. `.cargo_vcs_info.json` names the commit it was package
`824b0791a750f7b27b8edcbb6c6244d0e629875e`. That commit is not in the GitHub repository the manifest
names, which is archived; its README says development moved off GitHub.
local patch listed below. `.cargo_vcs_info.json` names the commit it was packaged from,
`824b0791a750f7b27b8edcbb6c6244d0e629875e`. That commit is not in the GitHub repository the manifest
names, which is archived; its README says development moved off GitHub.
Every file here except this one, `SOURCE.json` and the patched file below is byte for byte the file
in the `.crate` archive. `SOURCE.json` records the hash of the `.crate` download
(`source_archive_sha256`) and, for every file kept, the hash in the package (`source_sha256`) and the
@@ -395,6 +399,7 @@ Every change here updates this table and `SOURCE.json` in the same commit.
Every change here updates this table and `SOURCE.json` in the same commit.
| `src/curve/transverse.rs` | `transversal_after` returns `false` when either dy/dt bound it divides by is zero, negative or nan. It compared the two slope bounds by cross-multiplying, which reverses the comparison when a bound is negative. Two curves that leave a shared start point in opposite directions, with their first control points one ulp below the start, were reported as keeping their left-to-right order although they cross. `transversal_before` reflects its curves and calls `transversal_after`, so it returned the same wrong answer. The `crossing_with_negative_start_dy` test checks both functions. |
| `src/curve/mod.rs` | `CurveOrder::with_y_slop` keeps the comparison's `metrics` when it changes the entries, instead of returning empty metrics. Code comments label the change `Craft patch (y-slop metrics)`. The `y_slop_keeps_metrics` test applies slop to an order with one metrics entry. |
| `src/sweep/sweep_line.rs` | The doc comment of `SweepLine::line_segment` says it can return a segment that has exited, which `segment_range` leaves out. Code comments label the change `Craft patch (exited slots)`. |
`omitted_files` lists the 43 files of the package left out here, with their hashes:
+2
View File
@@ -79,6 +79,7 @@
"In `src/curve/mod.rs`, `intersect_cubics_rec` checks that both curves are on the interval's side at each interval end after re-centering only when the `slow-asserts` feature is on, as the crate's other expensive self-checks are. Re-centering rounds each end, and with finite curves near 1e8 the curves at a rounded end were on the wrong side by up to 69 times `ish_tolerance`, so debug builds panicked with `assertion failed: solve_x_for_y(cubic0.c, y0) > solve_x_for_y(cubic1.c, y0)` or one of its three companions. Release builds already skipped the check, and the change gives debug builds the release result. The test `curve::test::crossing_at_large_coordinates` covers it."
"In `src/curve/transverse.rs`, `transversal_after` (and `transversal_before`, which calls it) returns `false` when either dy/dt bound is not positive, instead of cross-multiplying the slope bounds, which reverses the comparison for a negative bound."
"In `src/curve/mod.rs`, `CurveOrder::with_y_slop` keeps the comparison's `metrics` when it changes the entries, instead of returning empty metrics. `y_slop_keeps_metrics` tests it."
"In `src/sweep/sweep_line.rs`, the doc comment of `SweepLine::line_segment` says it can return a segment that has exited, which `segment_range` leaves out."
],
"files": [
{ "path": ".cargo_vcs_info.json", "source_sha256": "47fba6a9dbdf445a5c97f783c9be62093035f9d5e5cdc2cf3216ad8259bcd8fc", "source_git_blob": null, "sha256": "47fba6a9dbdf445a5c97f783c9be62093035f9d5e5cdc2cf3216ad8259bcd8fc" },
@@ -212,6 +213,7 @@
{ "path": "src/sweep/sweep_line.rs", "source_sha256": "822b261f682911ea0c0370eaf17d9201a1e639b315359dcb6a3b877a229816e3", "source_git_blob": null, "sha256": "644dcaeacd1afcf056920916acdf271f099dc5e0c0324b5fbacd6aae4f597adb" },
{ "path": "src/sweep/sweep_line.rs", "source_sha256": "822b261f682911ea0c0370eaf17d9201a1e639b315359dcb6a3b877a229816e3", "source_git_blob": null, "sha256": "fd0ae254cb23b7c9dfda7dd172d6afd88f7496a2579b973b49a55d7246bb427e" },
{ "path": "src/sweep/sweep_line.rs", "source_sha256": "822b261f682911ea0c0370eaf17d9201a1e639b315359dcb6a3b877a229816e3", "source_git_blob": null, "sha256": "b4f7da196be5676424f0f19e5f21f29ffa1ff60f2a4f6b9846357e73fecf0daf" },
{ "path": "src/sweep/sweep_line.rs", "source_sha256": "822b261f682911ea0c0370eaf17d9201a1e639b315359dcb6a3b877a229816e3", "source_git_blob": null, "sha256": "b8569de346ffe8f35f9b56a3e3621ed0910c5a572c58b3184fe2810d6c82a416" },
{ "path": "src/topology.rs", "source_sha256": "9c9b48bc3853884425127e2d64e8ed957ba0d27e1696e2c457e95282e52d6a5b", "source_git_blob": null, "sha256": "9c9b48bc3853884425127e2d64e8ed957ba0d27e1696e2c457e95282e52d6a5b" },
{ "path": "src/treevec.rs", "source_sha256": "d88b9fbf02fa9f318560e1d483d465555f2b696ae12c00f8e4f5b71ea6779445", "source_git_blob": null, "sha256": "f37cde80ea90fcbfc5799abf855e8516cd00dbbd809ed25d11993e864c4516ad" },
{ "path": "src/sweep/sweep_line.rs", "source_sha256": "822b261f682911ea0c0370eaf17d9201a1e639b315359dcb6a3b877a229816e3", "source_git_blob": null, "sha256": "822b261f682911ea0c0370eaf17d9201a1e639b315359dcb6a3b877a229816e3" },
+4
View File
@@ -1946,6 +1946,10 @@ impl<'segs> SweepLine<'_, '_, 'segs> {
}
/// Get the line segment at position `idx` in the new order.
///
/// Craft patch (exited slots): a segment that exits at this sweep line stays in
/// its position until the sweep advances, so unlike [`Self::segment_range`] this
/// can return a segment that has exited.
pub fn line_segment(&self, idx: usize) -> Option<SegIdx> {
self.state.line.segs.get(idx).map(|entry| entry.seg)
}