mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
G11: Shape Builder pieces: contract the sweep's stubs between two cuts of one path
Where two passes of a path (an open line's way there and back) cross another path, the sweep can cut them a rounding error apart and join the two cuts with a stub a little over its tolerance. Upstream's twin-piece joining already merges the ends of the two passes, but not such stubs, so dense hatches at exact binary steps (lines every 0.5 pt across a 45° line) still came back with a speck of a piece per crossing. The planar map now contracts such stubs into one vertex before the edges are built (within 4x eps up and down the sweep's frame and 1/16 of the 0.01 pt precision along it), bounded by each cluster's extent so a run of tiny, nearly level segments (a finely flattened or traced path) is not collapsed transitively. Ported from the fork's d5985b14 and 616a5c4a with their tests: a_dense_hatch_at_exact_binary_steps_cuts_each_line_once_per_crossing (fails without the fix), a_run_of_tiny_level_segments_is_not_contracted_as_stubs (fails without the extent bound) and a_line_crossed_where_its_two_passes_part_is_cut_once (already passing on upstream, kept as a regression test). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gCpjL3yUhaH3jRp7ksufh
This commit is contained in:
committed by
bflatastic
co-authored by
Claude Opus 5.5
parent
c204d8959e
commit
e11ff0352b
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user