vtk python poininpolygon method

Hi ,
The poininpolygon() method can find in c++, but i can not ues in python (vtk 8.1.2, python3.7).
This method can ues in python? Where have a example (i search and not result)?
Thx!

It looks to be a static method. Though 8.1 might be the root cause here. @dgobbi?

The PointInPolygon method isn’t wrapped because it has a bare double * parameter that isn’t hinted.

One way of doing an inside vs. outside check is vtkImplicitSelectionLoop.

loop = vtkImplicitSelectionLoop()
loop.SetLoop(points)
if loop.EvaluateFunction((x, y, z)) < 0.0:
    print("inside")
else:
    print("outside")
1 Like