[vtkusers] Distance filter

Koteswara Rao Ruvva ruvva at yahoo.com
Mon May 22 15:24:53 EDT 2017


I have the following code to compute the distance between two polygonal actors. 
def ComputeDistanceFilter(sourceActor, targetActor):        clean1 = vtk.vtkCleanPolyData()    clean1.SetInputData(sourceActor.GetMapper().GetInput())    clean2 = vtk.vtkCleanPolyData()    clean2.SetInputData(targetActor.GetMapper().GetInput())
    distanceFilter = vtk.vtkDistancePolyDataFilter()    distanceFilter.SetInputConnection(0, clean1.GetOutputPort())    distanceFilter.SetInputConnection(1, clean2.GetOutputPort())    distanceFilter.Update()
I am not sure where and how the transformation of the actors should be used while computing the distance filter.
Thank youRao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170522/496cb414/attachment.html>


More information about the vtkusers mailing list