Extract curve by length?

I just created a basic polyline with five segments and I need to extract the segment that have exactly 22mm length and I can’t find a way to do so.

I want to put that segment into a separate tree and from there to create an 11mm fillet at both corners inside of the shape.

Please help.

Do not use an equality test for exactly 22 because your lengths may be ever so slightly off. You can use the Similarity component with a small threshold, or compare the absolute difference between each segment length and 22 to some custom tolerance: Abs(Length - 22) < 1 \cdot 10^{-6}

Ultimately you can use the Sift/Combine pattern to separate the custom segments, or use some other data manipulation.

segmentreplace.gh (12.7 KB)

Thank you for your solution. It is working good, excepting that I need to move the arc inside of the shape.

Oh I just did the Arc thing to show how to treat different segments in a polyline different ways. The filleting is a whole different problem. Depending on the angle between the adjacent segments, it can be quite tricky.