I'm doing it this way now:

def measureSegment(fnC, start, end, steps):
        pRange = end-start
        step = pRange/steps
        length = 0
        p1 = om.MPoint()
        p2 = om.MPoint()
        for i in range(steps-1):
                fnC.getPointAtParam(i*step, p1)
                fnC.getPointAtParam((i+1)*step, p2)
                length += p1.distanceTo(p2)
        return length

But I need quiet a few steps to get the same result as the node.
mmh..

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to