mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-11 16:44:15 -04:00
Pure deterministic ordering of the automatic catalogue: classify each point by its nearest bounding-rectangle side(s) with the preparation tolerance (a corner belongs to two sides), choose the facing side pair from the look-ahead target against the centre (right/left and top/bottom per the source plan), then order by matched facing sides descending, rank tier ascending (corner, midpoint/tangent peer tier, fallbacks), then arrival->entry + entry->target travel, then the stable geometric key. Without a target (last part) the tier leads and distance to the arrival breaks ties — never the plate origin. The input list is never mutated, no candidates are added, no cap is applied and entity order is never the tie-break; reversed and cyclically reindexed drawings rank to the identical geometric order.