[vtkusers] RE: vtkCellLocator in TCL - how to call

Goodwin Lawlor goodwin.lawlor at ucd.ie
Mon Mar 29 07:01:50 EST 2004


Hi Tron,

vtkCellLocator::FindClosestPoint isn't in the tcl wrappers... It's
available to C++ (and I don't know about java and python).

To see what is wrapped to tcl in any class you can use "ListMethods".
For example, try "vtkCellLocator ListMethods". You wont see a
FindClosestPoint there.

It would be possible (I think) to add a method to the header:
double* vtkCellLocator::FindClosestPoint(double x, double y, double z),
that tcl would wrap.

Hth,

Goodwin
--__--__--

Message: 5
Date: Sat, 27 Mar 2004 17:28:45 +0100
From: Tron Darvann <tdarvann at lab3d.odont.ku.dk>
To: vtkusers at vtk.org
Cc: tdarvann at lab3d.odont.ku.dk
Subject: [vtkusers] vtkCellLocator in TCL - how to call

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