Due to the way in which Split(Polyline, List<Line>, double) method is written, it yields wrong results in cases where splitting curves consist of multiple segments, as in the picture below:
In the above case, the splitting curve consists of 3 segments, while the alternative path along the outline is only 2 segments, therefore it is considered 'shorter' by the algorithm, resulting in the splitting curve being simply ignored:
After investigation I believe this issue cannot be solved by simply fixing the current implementation, we will need something more complex, based on angles between edges (luckily in my work on https://github.com/BHoM/BHoM_Engine/issues/3260 I may have came up with a faster solution).
Happy to attempt to fix it as I have lots of code ready. Adding @FraserGreenroyd as 2nd assignee because he overviewed the original implementation.
Description:
Due to the way in which![image](https://github.com/BHoM/BHoM_Engine/assets/26874773/b1f2f627-75cf-4af1-a344-4415456e17f2)
Split(Polyline, List<Line>, double)
method is written, it yields wrong results in cases where splitting curves consist of multiple segments, as in the picture below:In the above case, the splitting curve consists of 3 segments, while the alternative path along the outline is only 2 segments, therefore it is considered 'shorter' by the algorithm, resulting in the splitting curve being simply ignored:![image](https://github.com/BHoM/BHoM_Engine/assets/26874773/0c522dd9-9923-48ec-9ba6-c2c11c8281c6)
After investigation I believe this issue cannot be solved by simply fixing the current implementation, we will need something more complex, based on angles between edges (luckily in my work on https://github.com/BHoM/BHoM_Engine/issues/3260 I may have came up with a faster solution).
Happy to attempt to fix it as I have lots of code ready. Adding @FraserGreenroyd as 2nd assignee because he overviewed the original implementation.
Test file(s):
On SharePoint.