-
Notifications
You must be signed in to change notification settings - Fork 13
Geometry_Engine: Fix bug where SortAlongCurve for a Polyline returns duplicate points #3107
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
Geometry_Engine: Fix bug where SortAlongCurve for a Polyline returns duplicate points #3107
Conversation
@BHoMBot check required |
@peterjamesnugent to confirm, the following actions are now queued:
|
This reverts commit 20165dc.
@BHoMBot check unit-tests |
@peterjamesnugent to confirm, the following actions are now queued:
|
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.
Happy to approve the changes because they fix the issue stated. However, I have looked into the code and ended up with a few question marks such as:
- points that do not lie on the curve get culled without even a warning (I would argue they should be sorted based on the closest point on curve, while a warning about being skipped sounds like a bare minimum)
IsOnCurve
is called multiple times, while it could be done only once (pair each point with the closest curve and work with each of such sets independently)
Of course this is just a side comment, out of scope of this PR. But curious about your opinion on the above points @peterjamesnugent
@pawelbaran agree, if we are culling we need to make that clear in the description. Given that you can use |
Project the points, but still sort the original input, right? So that the original input points get sorted based on their correspondent points on curve, would that make sense or am I overcomplicating? |
Yes exactly. |
#3108 raised 👍 Meanwhile, happy to get this PR merged as soon as the checks pass. |
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 was addressed, happy to approve for merge.
@FraserGreenroyd to confirm, the following actions are now queued:
There are 34 requests in the queue ahead of you. |
The check |
The check |
@BHoMBot check ready-to-merge |
@FraserGreenroyd to confirm, the following actions are now queued:
There are 16 requests in the queue ahead of you. |
@BHoMBot this is a DevOps instruction. I am requesting neutral checks on: unit-tests |
@FraserGreenroyd I have provided neutral checks to the checks requested. These checks will need to be run properly to obtain full results. |
FAO: @FraserGreenroyd The check they wish to have dispensation on is unit-tests. If you are providing dispensation on this occasion, please reply with:
|
Issues addressed by this PR
Closes #3104
Test files
https://burohappold.sharepoint.com/:u:/r/sites/BHoM/02_Current/12_Scripts/01_Issue/BHoM/BHoM_Engine/Geometry_Engine/%233104-SortAlongCurve.gh?csf=1&web=1&e=zkOUFi
Changelog
Fixed a bug where a closed
Poyline
was returning morePoint
s than were being input.Additional comments
UnitTests only include
Ellipse
so I have added thePolyline
tests.