Python script doesn't work correctly in V6

I have a script that prepares curves for my wire eroder, it sets the start point and a pause point for closed curves. The script has worked fine in V5 but in V6 the start point is in the wrong place when the script finishes,

I’ve found if I reverse the list passed to JoinCurves it works in V6 as before but this means I can’t use the same script for V5 and 6. Haven’t looked at whether JoinCurves or SplitCurve has changed.

        if point:
            #rs.AddPoint(point)
            param = rs.CurveClosestPoint(curve, point)
            #print "Curve parameter:", param
            newCurve = rs.SplitCurve( curve, param )
            if newCurve:
                #newCurve.reverse()
                curve = rs.JoinCurves(newCurve, True)
        rs.DeleteObject(stpoint)
        return(curve)

Here’s a screencast V6 first then V5

Mark

Edit added scriptSplitCurve.py (3.1 KB)

After a bit more testing the reverse trick doesn’t work on more complex profiles so not sure how to get this script to work again.

Mark

Traced this to join working different in V6 and made a post in the Rhino forum here. Don’t know if anyone can come up with a workaround for the script.

Thanks Mark