Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This is an util lets you to find a closest vertex on a mesh in a fast and optimized way. It can be used in your scripts instead of standard Maya closestPoint or something else (speed increases up to 5-10 times and more!)
In archive you can find sources for a Visual Studio project and files required for CMake. Using this data you can make a build for every Maya version you want. Also I've attached a compiled version of the plugin for Maya 2013 x64.
Format of the command: findVertex -mesh mesh -point point [-axis axis -center center -cache cache]
Description: Command finds a closest vertex (not a point!) on a mesh.
Flags: -mesh (-m) a mesh you find a closest vertex on (geometry name) -point (-p) input point (3 floats) -axis (-a) mirror axis. Can be "x", "y" or "z" (1 character) -center (-c) center of mirror (3 floats) -cache (-ca) use cache or not (true of false). It should be true if mesh is not being deformed during your script evaluation.
Examples: findVertex -mesh geo -point 1 2 3 -cache true; findVertex -mesh geo -point 1 2 3 -axis "x" -cache true; // find a mirror vertex on a mesh