[vtkusers] Detect points inside or outside a space
Alex Southern
mrapsouthern at gmail.com
Wed Aug 4 07:07:18 EDT 2010
Actually I just found this example that appears to do part of the job...
http://www.vtk.org/Wiki/VTK/Examples/PolyData/PointInsideObject
Thanks anyway.
Alex
On 4.8.2010 12:03, Alex Southern wrote:
> Hi,
>
> I've been avoiding using VTK to do this, but it seems that it may be
> relatively simple to do rather coding it from scratch.
>
> Basically, Id like to draw a volume in something like Google Sketchup
> use one of the free converters to generate a VTK file. Id then like to
> read that file into my own app (no problems here), and then define a
> cuboid container, around the volume of interest, which contains a 3D
> equally spaced grid of points (e.g 10 million), I then want to be able
> to interrogate each point to find out if it is inside or outside the
> volume.
>
> The millions of points do not need to be visualized from an
> interaction point of view. So I suspect the points should be defined
> using vtkPoints? But how do I interrogate these to find out if they
> are inside or outside the volume.
>
> The user could supply co-ordinates of a point that is definitely
> inside the volume, if necessary.
>
> I have put up a temporary link to a typical volume of interest as a
> vtk file (Complex3D.vtk), this was drawn in sketchup.
>
> http://www.tml.tkk.fi/~aps/ <http://www.tml.tkk.fi/%7Eaps/>
>
> Any examples or nudges in the right direction would be greatly
> appreciated.
>
> Thanks
> Alex
More information about the vtkusers
mailing list