Skip to content

Conversation

@0hmX
Copy link
Contributor

@0hmX 0hmX commented Dec 24, 2025

Motivation

  • Ensure seed candidate generation honors the board outline polygon so we don't place seeds outside the board cutout.
  • Fixes incorrect seeding behavior from an older PR by applying the same outline-based filtering to both grid and edge seed paths.
  • Keep visual/formatting behavior unchanged and only adjust seeding logic to be outline-aware.

Description

  • Thread outline through to computeCandidates3D and computeEdgeCandidates3D and import isPointInPolygon for polygon checks.
  • Early-filter candidate and edge seed points using isPointInPolygon so points outside the outline are skipped.
  • Pass this.srj.outline from RectDiffSeedingSolver into both candidate helpers for consistent behavior.
  • Files changed: lib/solvers/RectDiffSeedingSolver/computeCandidates3D.ts, lib/solvers/RectDiffSeedingSolver/computeEdgeCandidates3D.ts, and lib/solvers/RectDiffSeedingSolver/RectDiffSeedingSolver.ts.

Testing

  • Ran typecheck with bunx tsc --noEmit and it completed successfully.
  • Ran the test suite with bun test and all automated tests passed (11 pass, 1 skip, 0 fail).
  • The updated board-outline snapshot test remains passing (tests/board-outline.test.ts).

Codex Task

@vercel
Copy link

vercel bot commented Dec 24, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
rectdiff Ready Ready Preview, Comment Dec 24, 2025 8:16pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants