mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-19 06:38:44 +00:00
brush_targets checked each brushable node against every target it had already collected, so P targets cost about P^2/2 comparisons. It now keeps a HashSet of the ids it has pushed. The output vector is unchanged: the same ids in the same walk order, each kept where it is first reached. brush.apply, brush.remove, Expand on brushed paths and the brush library's apply all collect their targets through it. A unit test checks the exact result for guides, clipping paths, compound members, nested compounds, repeated and overlapping roots and a missing id, and compares it with a copy of the old collector.