rs.OffsetCurveOnSurface extends resulting offset beyond the surface trimm

Dear all,

i am having trouble with the rs.OffsetCurveOnSurface command in combination with a trimmed surface. The command is supposed to extend the resulting offsets to the edge of the surface. Yet I have found one case where one of the resulting offsets is extended beyound the surface edge:

Is this a bug, or did i miss something on how this command is supposed to work?

test_offset_on_srf.py (1.4 KB)
test_offset_on_srf.py.3dm (152.9 KB)

Thank you for your report.
There are cases when you might not get the correct result.
I was able to repeat using the Rhino command OffsetCrvOnSrf. Files a bug here…
image