[vtkusers] vtkCellLocator in TCL - how to call

Tron Darvann tdarvann at lab3d.odont.ku.dk
Sat Mar 27 11:28:45 EST 2004


Hello VTK tcl users,

Short version of my question:

How do I use vtkCellLocator in tcl?
I wish to use the FindClosestPoint method, but how do I use it?

set x 100.0
set y 100.0
set z 100.0
set xyz {$x $y $z}
vtkCellLocator locator
locator SetDataSet Poly
locator BuildLocator
set clos [locator FindClosestPoint $xyz a b c d ]

(Error message: Object named locator, could not find requested method:
FindClosestPoint or the method was called with incorrect arguments
while executing "locator FindClosestPoint $xyz a b c d")

In the  Class Reference for vtkCellLocator its definition is
void FindClosestPoint (float[3], float closestPoint, vtkIdType &cellId,
int &subId, float &dist2)

Thanks in advance for any help.

Tron Darvann
Research Engineer
3D-Lab, Copenhagen




More information about the vtkusers mailing list