-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BoundingBoxXYZ.FromRevit() added and closest element query tweaked #1279
Conversation
@pawelbaran to confirm, the following actions are now queued:
There are 1 requests in the queue ahead of you. |
@BHoMBot check versioning |
@pawelbaran to confirm, the following actions are now queued:
There are 11 requests in the queue ahead of you. |
@pawelbaran to confirm, the following actions are now queued:
There are 23 requests in the queue ahead of you. |
@BHoMBot check installer |
@pawelbaran to confirm, the following actions are now queued:
There are 9 requests in the queue ahead of you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Converting to BH.oM.Geometry.BoundingBox
will definatelly be useful in geometric methods and I'm happy with this part 👍
One comment to the ClosestElement
method:
Revit_Toolkit/Revit_Core_Engine/Query/ClosestElement.cs
Lines 70 to 77 in 6849abe
// get original element location | |
Location location = originalElement.Location; | |
if (!(location is LocationPoint)) | |
{ | |
BH.Engine.Base.Compute.RecordError(String.Format("Original element to search for closest element is not point XYZ based. Location of type {0} is not implemented in this search.",location.GetType())); | |
return null; | |
} | |
XYZ point = (location as LocationPoint).Point; |
Shouldn't we get the location of non-point elements? We can do it in the same way as in line 129:
searchedPoint = (searchedBoundingBox.Min + searchedBoundingBox.Max) / 2; |
Fair point @michal-pekacki, I have rewritten the method to actually cover all types of locations - should be ready to re-review now. |
@pawelbaran to confirm, the following actions are now queued:
|
@pawelbaran to confirm, the following actions are now queued:
There are 2 requests in the queue ahead of you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My comment is included, happy to approve 👍
@pawelbaran to confirm, the following actions are now queued:
|
Issues addressed by this PR
Closes #1277
Closes #1278
Test files
Changelog
Additional comments