Skip to content

Fix insert bounding boxes for rotated blocks#1111

Open
chui-xelleron wants to merge 1 commit into
DomCR:masterfrom
chui-xelleron:fix/insert-bounding-box
Open

Fix insert bounding boxes for rotated blocks#1111
chui-xelleron wants to merge 1 commit into
DomCR:masterfrom
chui-xelleron:fix/insert-bounding-box

Conversation

@chui-xelleron

Copy link
Copy Markdown

Insert.GetBoundingBox() now transforms all eight corners of the block bounding box instead of only the min/max pair. That avoids underestimating the extents when the inserted block is rotated or mirrored.

This keeps the change small and targeted:

  • empty/infinite boxes are passed through unchanged
  • the regression test uses a rotated rectangular solid to prove the old min/max shortcut was wrong

Verified with:

  • dotnet test src/ACadSharp.Tests/ACadSharp.Tests.csproj -f net9.0 --filter FullyQualifiedName~ACadSharp.Tests.Entities.InsertTest.GetBoundingBoxUsesAllTransformedCorners -v minimal

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.

2 participants