Iāve been following this thread and have actually enjoyed trying the challenge, teaching myself a few things along the way. Iāve been working on another method independent of Voronoi, but it still needs some work and inspiration. In the meantime, I have a few responsesā¦
@laurent_delrieu and @stu92, I put together an alternative to using the C# code, see attached. I couldnāt think of a component alternative to your code, so I took a slightly different route. I thought the sorting of the Series is a pretty interesting technique. Personally, I like to avoid meshes unless necessary, but it seems to be pretty useful here.
190716 - Straighten Curve WIP_LD_NoC#.gh (65.0 KB)
@stu92 Here are some notes I took when looking over your file:
190725 - Boundary Expansion - WIP-Comment 190725.gh (42.0 KB)
I like what you did with the sorting the two offset curves by length and choosing the longest side. Alternatively, Iād use the flip C (component) using a GH constructed circle as the guide.
The reason why @laurent_delrieu sorts the point distances is to select the closest point in the brep, which becomes the first point in the path, and then translates it into something his C# code could work with. When you grafted the four regions, the BrepCP stopped analyzing each point by all four regions and paired them off, analyzing the first of each list, then the second, and so on (see the image). I hope this answers your first question.
Iām not certain I follow your logic in the second question, but you can use āCurve Closest Pointā for the point/line intersection and test for which points have a 0 distance. Hope that helps.
Btw, not to be āthat guy,ā but ātree?ā is not a question!
If I canāt finish or make any progress in my version in a week or so, Iāll share it and see if anyone here has any ideas to make it work.