Query.Space - find closest space added#1641
Open
michal-pekacki wants to merge 5 commits intodevelopfrom
Open
Conversation
pawelbaran
previously approved these changes
Feb 24, 2026
Member
pawelbaran
left a comment
There was a problem hiding this comment.
Passing on the approval from @JanineConway 👍
Member
|
@BHoMBot check ready-to-merge |
|
@pawelbaran to confirm, the following actions are now queued:
|
Rework Space lookup logic to better handle FamilyInstances and linked documents. Key changes: - Early return for FamilyInstance.Space when FI has no spatial calculation point. - Use element.LocationPoint(false) for primary location and apply linked-document transform to the point before containment tests. - Defer collecting spaces until after transforming the location point; still populate m_LinkTransforms for spaces from linked docs. - Only use room calculation point when FI has a spatial calculation point and useRoomCalculationPoint is true; prefer fi.Space when available. - Adjust comment numbering and preserve existing fallback strategies (connector-based nearest space and searching below). These changes ensure correct space resolution for elements coming from linked models and for family instances with or without calculation points.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOTE: Depends on
Issues addressed by this PR
Closes #
Added a mechanism to find closest space for elements that are physically outside the space (e.g. air terminals located above the space or fire dampers located in the walls between spaces).
Test files
Changelog
Additional comments