[vtkusers] vtkDataSet FindAndGetCell() error returning -1 when intersection should be found

shawn mckenzie shawn.mcknezie at gmail.com
Fri Aug 11 10:46:41 EDT 2006


I am using the FindAndGetCell method to determine the intersection of a line
with the cubes of an Unstructured grid. In my filter I call the method:
...
// return cellId of intersected cell for each cellId in my line
// x is point ( double[3] ) from line, tol2=0.01
// input is Unstructured grid dataset
cellId = input->FindCell(x,NULL,-1,tol2,subId,pcoords,weights);

Most cells are returned as intersected, but some which should be returning
valid Ids are not finding an intersection, returning -1.
Corresponding to the attached screenshots, I have in a separate output file:

Point Id: 0, coords: 0.767587, 7.36382, 3.7685
CellId: -1
Point Id: 1, coords: 0.940737, 6.79229, 3.58923
CellId: -1
Point Id: 2, coords: 1.11389, 6.22076, 3.40996
CellId: -1
Point Id: 3, coords: 1.28704, 5.64924, 3.2307
CellId: -1
Point Id: 4, coords: 1.46019, 5.07771, 3.05143
CellId: -1
Point Id: 5, coords: 1.63334, 4.50618, 2.87216
CellId: 68
Point Id: 6, coords: 1.80649, 3.93465, 2.6929
CellId: 77
Point Id: 7, coords: 1.97964, 3.36313, 2.51363
CellId: -1
Point Id: 8, coords: 2.15279, 2.7916, 2.33436
CellId: 26
Point Id: 9, coords: 2.32594, 2.22007, 2.1551
CellId: 26
Point Id: 10, coords: 2.49909, 1.64855, 1.97583
CellId: 16
Point Id: 11, coords: 2.67224, 1.07702, 1.79656
CellId: 16
Point Id: 12, coords: 2.84539, 0.505494, 1.6173
CellId: 7
Point Id: 13, coords: 3.01854, -0.0660333, 1.43803
CellId: -1
Point Id: 14, coords: 3.19169, -0.63756, 1.25876
CellId: -1
Point Id: 15, coords: 3.36484, -1.20909, 1.0795
CellId: -1

How do we explain the lact of found cell for pointIds 3 and 4? I move my
line to various sections and always have 2-3 points that do not return found
cells.

Has anyone had similar difficulties?
Thank You
-Shawn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060811/0eeb1556/attachment.htm>


More information about the vtkusers mailing list