[prev in list] [next in list] [prev in thread] [next in thread]
List: vtkusers
Subject: Re: [vtkusers] Distance between PolyData and a point along a direction
From: David Doria <daviddoria () gmail ! com>
Date: 2012-03-29 11:24:58
Message-ID: CABDpjTnQzz+N3aAfNDTo6KqNYJV3bfSVhWeP2NUQZ5KAjApLUg () mail ! gmail ! com
[Download RAW message or body]
On Thu, Mar 29, 2012 at 4:17 AM, emreturkoz <emreturkoz@gmail.com> wrote:
> I have a point, and a point normal defined to it. Suppose I also have a
> polydata, which doesn't include or span this point.
>
> I want to find the distance from this point to the polydata along the
> polydata normal. By distance, I mean how far should I translate the point so
> that it "touches" the surface defined by polydata.
>
> Is this possible to do with vtk??
Is your polydata a mesh? If so, then you can use this:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/DataStructures/ModifiedBSPTree_IntersectWithLine
You have to build the tree. Then you have to defined a second point
along your line (it is an intersection with a line segment, not an
actual infinite ray). Then you can do the intersection and get the
distance between the query point and the intersection.
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic