mirror of
https://github.com/storytold/cadcraft.git
synced 2026-10-28 21:06:56 -06:00
With DIMASSOC on, every chained dimension looked up the objects under its definition points by scanning the whole space, and each point adds an entity, so a long `points` list took quadratic time (16,000 points: 2.7 s continue, 10 s baseline). The chain now builds one x-sorted SnapIndex up front. Dimensions are no snap targets, so the index stays valid while the chain adds them, and each lookup is a binary search. The index picks the same snap as find_snap: lowest rank first, then the first object in space order. A call with more than 100,000 points is refused. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>