Python script doesn't work correctly in V6

unhandled

#1

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)


V6 Join different to V5
#3

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


#4

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