<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><div>Hi David,</div><div>I've compiled the example. It works well, and I think it is exactly what I want. Thanks a lot for your timely reply.</div><div> </div><div>Regards,</div><div>Yue<br><br><br><br></div><div></div><div id="divNeteaseMailCard"></div><div></div>At 2013-11-21 21:03:04,"David Doria-2-3 [via VTK]" <<a href="/user/SendEmail.jtp?type=node&node=5724604&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>> wrote:<br> <blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;" id="isReplyContent">
        On Thu, Nov 21, 2013 at 7:35 AM, Green Hedgehog <<a href="/user/SendEmail.jtp?type=node&node=5724550&i=0" rel="nofollow" target="_top" link="external">[hidden email]</a>> wrote:
<br>> Hi all,
<br>> There's a point outside or inside a closed surface, and I want to find a
<br>> point on the surface which is closest to the specified point. The solution
<br>> may not be a vertex, but just a point lying on the triangle. Currently I
<br>> have no idea. Has anyone got any suggestions? Thanks in advance.
<br>>
<br>> Regards,
<br>> Yue
<br><br>I believe the FindClosestPoint function of vtkCellLocator does what
<br>you're looking for:
<br><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/CellLocator" rel="nofollow" target="_top" link="external">http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/CellLocator</a><br><br>If you can confirm that this works directly and let me know, I'll add
<br>notes and keywords to that example to the effect of "projecting a
<br>point onto a mesh" and "closest point on a mesh" as this is a very
<br>reasonable operation that has a not-so-intuitive name in VTK.
<br><br>David
<br>_______________________________________________
<br>Powered by www.kitware.com
<br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="nofollow" target="_top" link="external">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="nofollow" target="_top" link="external">http://www.vtk.org/Wiki/VTK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:
<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers" rel="nofollow" target="_top" link="external">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
        
        
        
        <br>
        <br>
        <hr color="#cccccc" SIZE="1" noShade>
        <div style="font: 12px/normal tahoma, geneva, helvetica, arial, sans-serif; color: rgb(68, 68, 68); font-size-adjust: none; font-stretch: normal;">
                <div style="font-weight: bold;">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://vtk.1045678.n5.nabble.com/How-to-find-the-point-on-the-mesh-closest-to-a-specified-point-tp5724549p5724550.html" target="_top" rel="nofollow" link="external">http://vtk.1045678.n5.nabble.com/How-to-find-the-point-on-the-mesh-closest-to-a-specified-point-tp5724549p5724550.html</a>
        </div>
        <div style="font: 11px/1.5em tahoma, geneva, helvetica, arial, sans-serif; color: rgb(102, 102, 102); margin-top: 0.4em; font-size-adjust: none; font-stretch: normal;">
                
                To unsubscribe from How to find the point on the mesh closest to a specified point, <a href="" target="_top" rel="nofollow" link="external">click here</a>.<br>
                <a style="font: 9px/normal serif; font-size-adjust: none; font-stretch: normal;" href="http://vtk.1045678.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" target="_top" link="external">NAML</a>
        </div></blockquote></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>
        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/How-to-find-the-point-on-the-mesh-closest-to-a-specified-point-tp5724549p5724604.html">Re:Re: How to find the point on the mesh closest to a specified point</a><br/>
Sent from the <a href="http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html">VTK - Users mailing list archive</a> at Nabble.com.<br/>