<div dir="ltr"><div>Hi Evan,</div><div><br></div><div>If you are using VTK 6.1 or later, you should be able to use that method from Python.  When a method asks for a pointer to int, float, double, etc., pass a Python container.  A python list is usually a good choice.</div><div><br></div><div>The best way to check if a method is available is with the Python help() function:</div><div><br></div><div>help(vtk.vtkPolygon.PointInPolygon)</div><div><br></div><div>Help on built-in function PointInPolygon:</div><div><br></div><div>PointInPolygon(...)</div><div>    V.PointInPolygon([float, float, float], int, [float, ...], [float,</div><div>         float, float, float, float, float], [float, float, float])</div><div>        -> int</div><div>    C++: static int PointInPolygon(double x[3], int numPts,</div><div>        double *pts, double bounds[6], double n[3])</div><div>    </div><div>    Determine whether point is inside polygon. Function uses</div><div>    ray-casting to determine if point is inside polygon. Works for</div><div>    arbitrary polygon shape (e.g., non-convex). Returns 0 if point is</div><div>    not in polygon; 1 if it is. Can also return -1 to indicate</div><div>    degenerate polygon.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 16, 2016 at 3:10 PM, Evan Kao <span dir="ltr"><<a href="mailto:tossin@gmail.com" target="_blank">tossin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello all,<div><br></div><div>I was wondering if there was any way to use class methods that have array pointer inputs in Python.  For example, I was looking at the <font face="monospace, monospace"><a href="http://www.vtk.org/doc/nightly/html/classvtkPolygon.html#a02bd9f9ae98053a1923a0231aea12d09" target="_blank">vtkPolygon.PointInPolygon</a>(<wbr>)</font> method, which takes an array pointer specifying the points.  <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/PointInPolygon" target="_blank">This C++ example</a> suggests getting the pointer by using a <font face="monospace, monospace">vtkPoints->GetVoidPointer()</font> method, but that doesn't seem to yield anything usable in Python.</div><div><br></div><div>Thanks,</div><div>Evan Kao</div></div></blockquote></div></div></div>