<html><head></head><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1495474763686_14017" dir="ltr">I have the following code to compute the distance between two polygonal actors. </div><div id="yui_3_16_0_ym19_1_1495474763686_14017" dir="ltr"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1495474763686_14217">def ComputeDistanceFilter(sourceActor, targetActor):</div><div dir="ltr" id="yui_3_16_0_ym19_1_1495474763686_14218"> </div><div dir="ltr" id="yui_3_16_0_ym19_1_1495474763686_14219"> clean1 = vtk.vtkCleanPolyData()</div><div dir="ltr" id="yui_3_16_0_ym19_1_1495474763686_14220"> clean1.SetInputData(sourceActor.GetMapper().GetInput())</div><div dir="ltr" id="yui_3_16_0_ym19_1_1495474763686_14221"> clean2 = vtk.vtkCleanPolyData()</div><div dir="ltr" id="yui_3_16_0_ym19_1_1495474763686_14222"> clean2.SetInputData(targetActor.GetMapper().GetInput())</div><div dir="ltr" id="yui_3_16_0_ym19_1_1495474763686_14223"><br id="yui_3_16_0_ym19_1_1495474763686_14224"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1495474763686_14225"> distanceFilter = vtk.vtkDistancePolyDataFilter()</div><div dir="ltr" id="yui_3_16_0_ym19_1_1495474763686_14226"> distanceFilter.SetInputConnection(0, clean1.GetOutputPort())</div><div dir="ltr" id="yui_3_16_0_ym19_1_1495474763686_14227"> distanceFilter.SetInputConnection(1, clean2.GetOutputPort())</div><div dir="ltr" id="yui_3_16_0_ym19_1_1495474763686_14228"> distanceFilter.Update()</div><div dir="ltr" id="yui_3_16_0_ym19_1_1495474763686_14229"><br id="yui_3_16_0_ym19_1_1495474763686_14230"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1495474763686_14229"><div dir="ltr" id="yui_3_16_0_ym19_1_1495474763686_14308">I am not sure where and how the transformation of the actors should be used while computing the distance filter.</div><div dir="ltr" id="yui_3_16_0_ym19_1_1495474763686_14309"><br id="yui_3_16_0_ym19_1_1495474763686_14310"></div></div><div dir="ltr" id="yui_3_16_0_ym19_1_1495474763686_14229">Thank you</div><div dir="ltr" id="yui_3_16_0_ym19_1_1495474763686_14229">Rao</div></div></body></html>