[vtkusers] Help with finding points inside a cell.

Guðni Karl Rosenkjær grosenkj at eos.ubc.ca
Wed May 22 14:53:19 EDT 2013


Hello,

I forgot to add that I am using self compiled version of vtk 5.10.1 source
code on a Linux 64 bit with Fedora 17.

Thanks in advance,
Cheers,
Gudni


On Wed, May 22, 2013 at 6:47 PM, Guðni Karl Rosenkjær
<grosenkj at eos.ubc.ca>wrote:

> Hello all,
>
> I have a problem where I want to find cells in a rectilinear grid that are
> within a unstructured grid. The unstructured grid has only 1 cell that is a
> polyhedron (types=42).
>
> I have written up a python script (testCellLocator.py in the attachment)
> where I use vtkCellLoctor.FindCell embedded in a if statement to check if
> the cell centers are in the polyhedron. I am not sure if this is the best
> way to do this. However I have gotten the script to work, except there are
> cells that are incorrectly determined inside and outside the polyhedron (in
> pvScreenShot.png). It is clear that some of the cells are outside the
> polyhedron cell and there are cells missing from within it.
>
> The questions that I have are:
> Is using the vtkCellLoctor.FindCell best way locate points with in the
> polyhedron cell?
> Using the vtkCellLoctor.FindCell method, what could be the reason for the
> error in locating the cells?
>
> Thank you very much in advance.
>
> Cheers,
> Gudni
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130522/de83dc06/attachment.htm>


More information about the vtkusers mailing list