of course it has to be:

fnC.getPointAtParam(*start*+i*step, p1)

but the current way is with sufficient accuracy just about as fast as my
version of the script measuring with nodes. boo.

On Wed, Jul 13, 2011 at 6:05 PM, Sebastian Schoellhammer <
[email protected]> wrote:

> 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..
>



-- 
Sebastian Schoellhammer

Sr. Technical Artist
Square Enix LTD
www.square-enix.com

-- 
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