Get isoparm length through API


#1

Hi,

Is it possible to get NURBS surface isoparm length with the Python API? I couldn’t find a method for this in the documentation.

I don’t want to extract a curve from the surface to get it’s length if possible.


#2

Are you talking about python in maya API?

You can get a range of your UV with cmds.polyEvaluate( uvComponent=1)
Then get the U and V value for every point with cmds.polyEditUV(q=1)

By comparing the U and V values of each points you should be able to detect isoparms. By comparing min U/V and max U/V for each isoparm, you will get the length.


#3

I should’ve been more clear. Yes, i mean maya api. But I’m talking about NURB surface isoparms.


#4

In maya.cmds you can get it with arclen(). If you absolutely must stay in the api, I think you’d have to create a curveInfo node, feed it your isoparm (or a duplicateCurve made from the isoparm) and then query it.


#5

The things is this is the method I’m using currently. But I don’t want to create a curve or an additional node in the scene just for that.
Ideally a method for this should have come with the MfnNurbsSurface. But apparently there’s no way doing it in code without creating temporary nodes.