[vtkusers] vtk python, point picker, UseCellsOff attribute error

redmod79 michael.j.redmond at gmail.com
Sun Nov 30 10:52:20 EST 2014


When using vtkPointPicker in python (vtk 6.1), trying to use UseCellsOff and
related methods results in an attribute error... it seems like using cell
points is on by default, and I don't want it to be... I want to be able to
pick the raw points created as shown below and not the cell points (ids 1,
2, 3, 4 of the cell)

points = vtk.vtkPoints()
... points added

ugrid = vtk.vtkUnstructuredGrid()

ugrid.SetPoints(points)

for i in range(cell_count):
    cell = some cell created using points
    ugrid.InsertNextCell(cell)

mapper = vtk.vtkMapper()
mapper.SetInputData(ugrid)
actor = vtk.vtkActor()
actor.SetMapper(mapper)

renderer = vtk.vtkRenderer()
renderer.AddActor(actor)

... in another part of the code using a custom interactor style

picker = vtk.vtkPointPicker()

picker.UseCellsOff() ... this causes the attribute error



doing print dir(picker) shows no methods UseCellsOff or related methods

Thank you for your help.




--
View this message in context: http://vtk.1045678.n5.nabble.com/vtk-python-point-picker-UseCellsOff-attribute-error-tp5729592.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list