toArcsAndLines bug?

I’m trying to break down curves into arcs and lines using the toArcsAndLines method, but get unexpected results. I think its a bug in the method; but maybe I’m missing something. Any ideas?

toarcsandlines_bug.gh (10.4 KB)

converted_a = to_convert_a.ToArcsAndLines(.1, 1, y, 0)

the second and fourth arguments seem off
angle tolerance is in radian
maximum length probably shouldn’t be 0
see api doc below

Thanks Will!

Changing the tolerances didn’t help, although I indeed overlooked the fact that angle tolerance is in radians; thanks for pointing this out.

Setting the maximum segment length to 50 does help in this case, but still it should be OK to not set a limit, or use a higher maximum segment length… right?

With a segment length of 250 for example, the big arc reappears again, clearly ignoring the given tolerances.

I don’t follow. 250 is a large number. It gives you a big arc. Seems expected.

It gives a big arc, but one that is clearly exceeding the maximum deviation set in tolerance.

I expect the maximum segment length is used to break down long straight lines or perfect arcs into smaller segments if desired.