Skip to content

Object: do not include MRBox.h - #6816

Merged
Fedr merged 1 commit into
masterfrom
lean/object-box
Sep 9, 2026
Merged

Object: do not include MRBox.h#6816
Fedr merged 1 commit into
masterfrom
lean/object-box

Conversation

@Fedr

@Fedr Fedr commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

MRObject.h no longer includes MRBox.h. The only thing in the header that needed Box3f complete was the inline getWorldBox() body, so that moves to the .cpp (MRMESH_API virtual, as the override declarations in the holders already are); Box3f in the two remaining declarations is satisfied by MRMeshFwd.h.

MRVisualObject.h now includes MRBox.h itself - it has an inline computeBoundingBox_() returning Box3f() and a std::optional<Box3f> member - which keeps every visual-object descendant supplied. MRObject.cpp includes it for getWorldTreeBox().

Verified with a cl /Zs sweep of MRMesh, MRViewer, MRVoxels and MRSymbolMesh: failing-TU sets identical to the same sweep on master (4 known no-PCH artifacts in MRMesh, 82 in MRViewer, 0 elsewhere). An include-graph pass over the repo - traversing thirdparty and vcpkg headers this time, so std headers reached through MRBox.h (<algorithm>, <cassert>, <iosfwd>, <limits>, <type_traits>) are accounted for - leaves only MRObjectTransformWidget.h, whose const Box3f& parameters need no definition.

Note this overlaps #6274, which drops MRBox.h along with MRAffineXf3.h, MRViewportProperty.h and <array> and makes the same getWorldBox() and MRVisualObject.h changes; whichever lands second will need a trivial conflict resolution.

getWorldBox() moves out of line, since its inline `return {}` was the only thing in MRObject.h requiring Box3f to be complete.
@Fedr
Fedr merged commit 757570c into master Sep 9, 2026
55 checks passed
@Fedr
Fedr deleted the lean/object-box branch September 9, 2026 13:24
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