i have some code that finds the point on a curve closest to another curve:

crv1 = pm.PyNode(finger + 'Centre')
crv2 = pm.PyNode(finger + 'Cross')
loc = pm.createNode('locator')
locTransform = loc.getParent()

loc.setParent(crv2, s=True, r=True)
cpoc = pm.createNode('nearestPointOnCurve')

# connect ep[1] to locator local position
pm.connectAttr(crv2.editPoints[1], loc.localPosition, f=True)
crv1.worldSpace[0] >> cpoc.inputCurve
loc.worldPosition[0] >> cpoc.inPosition

vec_target = cpoc.position.get()

the result of this is the location in 3d space of the point on one curve 
closest to the other curve.

what i want to know is how can i insert a knot on the other curve based on this 
point now found in 3d space. I needs to somehow be converted to a .u[] 
parameter value so it can be used in the insertKnotCurve command


You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to