- Convert static class to instance with private constructor; shared parameters (template, plateOptions, salvageRate, minRemnantSize, progress, token) become fields, eliminating parameter threading across all private methods (10→3 params on Nest entry point stays unchanged; private methods drop from 7-9 params to 1-2) - Extract FillAndPlace helper consolidating the repeated clone→fill→add-to-plate→deduct-quantity pattern (was duplicated in 4 call sites) - Merge FindScrapZones/FindViableRemnants (98% duplicate) into single FindRemnants(plate, minRemnantSize, scrapOnly) method - Extract ScoreZone helper and collapse duplicate normal/rotated orientation checks into single conditional - Extract CreateNewPlateResult helper for repeated PlateResult construction + PlateOption lookup pattern Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
15 KiB
15 KiB