<html><div style='background-color:'><DIV>Thanks for the response, Goodwin.. </DIV>
<DIV> </DIV>
<DIV>So is there any function at all in OBBTree that I can use to locate which cell contains any pariticular point in an unstructured grid..?</DIV>
<DIV> </DIV>
<DIV>(and anywyas - I think CellLocator is apparantly more effecient right?)</DIV>
<DIV>Thanks</DIV>
<DIV>Mike</DIV>
<DIV> </DIV>
<DIV></DIV>>From: "Goodwin Lawlor" <GOODWIN.LAWLOR@UCD.IE>
<DIV></DIV>>Reply-To: "Goodwin Lawlor" <GOODWIN.LAWLOR@UCD.IE>
<DIV></DIV>>To: "VTK-User" <VTKUSERS@VTK.ORG>,<LOST_BITS1110@HOTMAIL.COM>
<DIV></DIV>>Subject: vtkOBBTree vs. vtkCellLocator
<DIV></DIV>>Date: Mon, 17 Nov 2003 20:56:35 -0000
<DIV></DIV>>MIME-Version: 1.0
<DIV></DIV>>X-Originating-IP: [195.218.110.229]
<DIV></DIV>>X-Originating-Email: [g00dw1n@hotmail.com]
<DIV></DIV>>Received: from 195.218.110.229 by law11-oe22.law11.hotmail.com with DAV;Mon, 17 Nov 2003 20:58:32 +0000
<DIV></DIV>>Message-ID: <20031117205833.3fb9367827923@hotmail.com>
<DIV></DIV>>References: <20031115112546.30756.57824.Mailman@public.kitware.com>
<DIV></DIV>>Organization: University College Dublin
<DIV></DIV>>X-Priority: 3
<DIV></DIV>>X-MSMail-Priority: Normal
<DIV></DIV>>X-Mailer: Microsoft Outlook Express 6.00.2720.3000
<DIV></DIV>>X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2727.1300
<DIV></DIV>>
<DIV></DIV>>Hi Mike,
<DIV></DIV>>
<DIV></DIV>>You could use vtkGeometryFilter to convert your ugrid to polydata and set
<DIV></DIV>>this as the dataset in vtkOBBTree. This isn't the end of your problems-
<DIV></DIV>>FindClosestPoint will crash anyway from vtkOBBTree.
<DIV></DIV>>
<DIV></DIV>>The problem occurs because vtkCellLocator defines "vtkIdList **Tree" whereas
<DIV></DIV>>vtkOBBTree defines "vtkOBBNode *Tree". FindClosestPoint() expects "vtkIdList
<DIV></DIV>>**Tree" and crashes in GetBucketNeighbours() when it doesn't get it from a
<DIV></DIV>>vtkOBBTree object.
<DIV></DIV>>
<DIV></DIV>>Basically, FindClosestPoint is for use only with vtkCellLocator... if you
<DIV></DIV>>want to uses it with vtkOBBTree you'd have to add a FindClosestPoint method
<DIV></DIV>>to that class (which uses the vtkOBBNode data structure).
<DIV></DIV>>
<DIV></DIV>>HTH
<DIV></DIV>>
<DIV></DIV>>Goodwin
<DIV></DIV>>University College Dublin
<DIV></DIV>>
<DIV></DIV>> > From: "M. Campopiano" <LOST_BITS1110@HOTMAIL.COM>
<DIV></DIV>> > To: vtkusers@vtk.org
<DIV></DIV>> > Date: Fri, 14 Nov 2003 18:20:09 +0000
<DIV></DIV>> > Subject: [vtkusers] vtkOBBTree vs. vtkCellLocator
<DIV></DIV>> >
<DIV></DIV>> > Hello again,
<DIV></DIV>> >
<DIV></DIV>> > So I was able to use vtkCellLocator using the following:
<DIV></DIV>> >
<DIV></DIV>> > celllocator->SetDataSet(ugrid);
<DIV></DIV>> > celllocator->BuildLocator();
<DIV></DIV>> > celllocator->FindClosestPoint(x, closestpoint, cellid, subid, dist);
<DIV></DIV>> >
<DIV></DIV>> > And now I invoke the EXACT same methods with vtkOBBTree but it crashes at
<DIV></DIV>> > BuildLocator()..?????
<DIV></DIV>> >
<DIV></DIV>> > obbtree->SetDataSet(ugrid);
<DIV></DIV>> > obbtree->BuildLocator(); //CRASHES HERE!!!!!!!!!!!!!?????
<DIV></DIV>> > obbtree->FindClosestPoint(xobb, closestpointobb, cellidobb, subidobb,
<DIV></DIV>> > distobb);
<DIV></DIV>> >
<DIV></DIV>> > Can anyone tell me why it works for the CellLocator and not for the
<DIV></DIV>> > OBBTree?? Its the exact same thing.. Note that my unstructured grid
<DIV></DIV>>contains
<DIV></DIV>> > quadratic tetra's
<DIV></DIV>> >
<DIV></DIV>> > Thanks
<DIV></DIV>> > Mike
<DIV></DIV>>
<DIV></DIV></div><br clear=all><hr> <a href="http://g.msn.com/8HMAENUS/2743??PS=">Send a QuickGreet with MSN Messenger.</a> </html>