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.