PairEvaluator was cloning the full CNC program (including all internal cutouts) for every candidate. For parts with many holes (e.g. 952), this caused O(n²) overlap checks and thousands of unnecessary polygon tessellations per candidate. Now extracts the perimeter shape once, builds a lightweight drawing from it, and uses that for all Part.CreateAtOrigin calls. Cutouts are irrelevant for best fit — only the outer boundary matters for pairing. 75x speedup on a 952-hole rectangle (30s → 0.4s). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5.2 KiB
5.2 KiB