Re: [Maya-Python] finding the nearest curve

2012-05-14 Thread Simon Payne
Hi Damon, I had already started evaluating bounding box proximity right before you emailed. The argument put to me with it was the shape of curves could be erratic enough to give you the wrong curve. But what you point out pretty much solves it, by narrowing down the possible nearest curves first,

Re: [Maya-Python] finding the nearest curve

2012-05-14 Thread damon shelton
I would suggest starting by checking object's distance based on their shape's bounding box extents as opposed to the whole object. With nurbs curves you wind up with pivots being far from where the actual curve is, sometimes they lie at the origin no matter where the actual cvs of the curve lie. Y

[Maya-Python] finding the nearest curve

2012-05-14 Thread simon payne
I need to write something to find the nearest curve to specific cv's on another curve, within a given limited distance. So far, the only idea I have is to write a plugin to evaluate the nearestPoint on curve, for every single one of hundreds of curves, just to find out the nearest one to the target