Skip to content

fix(viewer): use pre-transformed WCS bounds for block group spatial indexing#352

Merged
mlightcad merged 1 commit into
mainfrom
fix/group-wcs-bbox-spatial-index
Jun 12, 2026
Merged

fix(viewer): use pre-transformed WCS bounds for block group spatial indexing#352
mlightcad merged 1 commit into
mainfrom
fix/group-wcs-bbox-spatial-index

Conversation

@mlightcad

Copy link
Copy Markdown
Owner

Summary

  • Rename entity bounding-box metadata from box/boxes to wcsBbox/wcsChildBoxes across three-renderer and cad-simple-viewer for clearer WCS semantics.
  • Fix AcTrView2d.handleGroup double-transform bug: AcDbRenderingCache.draw already applies the INSERT matrix via applyMatrix, so spatial indexing must use the pre-transformed WCS bounds directly instead of multiplying group.matrix again.
  • Add dev-only consistency assertions (AcTrGroupWcsBboxAssert) and unit tests covering entity/group WCS bbox updates, layout spatial registration, and handleGroup indexing behavior.

Test plan

  • pnpm test -- --testPathPatterns="AcTr(Entity|Group|Line|LineSegments|MText|Point|Polygon|Shape|Image|Layout|View2d)" (60 tests passed)
  • Open a drawing with block references (INSERT) and verify window/crossing selection hits nested entities correctly
  • Confirm zoom extents and spatial queries still behave for mixed layer block inserts

@mlightcad mlightcad force-pushed the fix/group-wcs-bbox-spatial-index branch from 8e50896 to 0febe9e Compare June 12, 2026 10:37
@mlightcad mlightcad merged commit b80decd into main Jun 12, 2026
2 checks passed
@mlightcad mlightcad deleted the fix/group-wcs-bbox-spatial-index branch June 12, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant