It does the opposite.

Any MFn* class is called a “function set”, and contains functions you can
use for a particular type of Maya object. Like mesh-related functions in
MFnMesh. But MPx* classes are things that you the developer implement to
provide Maya with data. In this case, the closestPoint function is what you
implement to give Maya some idea of where the closest point is on your
custom node. Your custom node could, for example, be a mesh that you
generate and draw yourself. Something Maya normally does not know about or
know how to query. The closestPoint method is a way for you to give Maya
that missing information; presumably it would use that when snapping a Maya
manipulator or pivot to a point on that custom node.

As for a quicker alternative, there are other mesh-related tools for
finding points, such as MFnMesh::getClosestPoint, that has different
performance/feature tradeoffs.

On Thu, 6 Apr 2023 at 10:49, - Im3dJoe - Polygon Lab <ty55...@gmail.com>
wrote:

>
> I use MFnMesh.closestIntersection a lot to get the closest point on a mesh,
>
> but I found it very slow to a dense mesh,
>
> I have been told that Quaddraw use MPxSurfaceShape::closestPoint to snap
> point on the gpucache, but I can not find any example of how to use it,
>
> would anyone show me a hint?
>
> cheers
> Joe
>
>
> --
> 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
> https://groups.google.com/d/msgid/python_inside_maya/931c1e30-1a92-4095-9e99-8b3bbca80cf8n%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/931c1e30-1a92-4095-9e99-8b3bbca80cf8n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOB4sxYP0hw6CwkZUq%2Bx25-oLo3DcMX9hHN-T5DTXYp3wA%40mail.gmail.com.

Reply via email to