Skip to content

[quality] P1/XL: same-color region union (fewer paths) + seam handling #42

@realproject7

Description

@realproject7

Measured: ours = 236 paths vs perfectvector's 50. vtracer stacked emits many small per-region blobs.

Risks/corrections (hardest item):

  • Needs a geometry lib: pathops (Skia, preserves beziers) or shapely (GEOS, FLATTENS curves -> forces re-fit = depends on [quality] v1.2: compact Bézier fitting for smoothing (Schneider) #39). Project is deliberately pure-Python — adding either is an explicit supply-chain decision (confirm wheels for CI matrix); add a feature-flag/fallback when backend absent.
  • Must preserve fill-rule=nonzero + holes (eyes/cutouts); naive same-color union swallows holes filled by a later differently-colored path.
  • z-contiguous-only union (needed for paint-order safety) cannot reach 50 — set target 'materially fewer', measured, not a hard number. A true global merge needs a topological paint-order recompute.
  • Seam cracks are a GUARANTEED consequence of flat-fill+union (not optional): solve by overlap-by-construction (dilate lower/darker layer sub-pixel so upper fills overlap) folded INTO the union, with seam-check in its acceptance — not a post-hoc P2 sliver patch.

Re-scope XL; do AFTER #39 (fitter) and the palette ticket. See ANALYSIS-svgsmith-vs-perfectvector.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    follow-upAdversarial second-pass findingqualityOutput quality improvement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions