[vtkusers] How to find the point on the mesh closest to a specified point

Green Hedgehog yy198903 at 163.com
Mon Nov 25 03:55:00 EST 2013


Hi David,
I've compiled the example. It works well, and I think it is exactly what I want. Thanks a lot for your timely reply.
 
Regards,
Yue




At 2013-11-21 21:03:04,"David Doria-2-3 [via VTK]" <ml-node+s1045678n5724550h86 at n5.nabble.com> wrote:
On Thu, Nov 21, 2013 at 7:35 AM, Green Hedgehog <[hidden email]> wrote:
> Hi all,
> There's a point outside or inside a closed surface, and I want to find a
> point on the surface which is closest to the specified point. The solution
> may not be a vertex, but just a point lying on the triangle. Currently I
> have no idea. Has anyone got any suggestions? Thanks in advance.
>
> Regards,
> Yue

I believe the FindClosestPoint function of vtkCellLocator does what
you're looking for:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/CellLocator

If you can confirm that this works directly and let me know, I'll add
notes and keywords to that example to the effect of "projecting a
point onto a mesh" and "closest point on a mesh" as this is a very
reasonable operation that has a not-so-intuitive name in VTK.

David
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers



If you reply to this email, your message will be added to the discussion below:
http://vtk.1045678.n5.nabble.com/How-to-find-the-point-on-the-mesh-closest-to-a-specified-point-tp5724549p5724550.html
To unsubscribe from How to find the point on the mesh closest to a specified point, click here.
NAML



--
View this message in context: http://vtk.1045678.n5.nabble.com/How-to-find-the-point-on-the-mesh-closest-to-a-specified-point-tp5724549p5724604.html
Sent from the VTK - Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131125/bbbd0eab/attachment.htm>


More information about the vtkusers mailing list