<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2730.1700" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>No, nothing in vtkOBBTree can do that... you'd have
to write the function yourself. Perhaps vtkDataSet::FindCell does what you want
(its a superclass of vtkUnstructuredGrid).</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>HTH</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Goodwin</FONT></DIV>
<DIV><FONT face=Arial size=2>University College Dublin</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=lost_bits1110@hotmail.com href="mailto:lost_bits1110@hotmail.com">M.
Campopiano</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=goodwin.lawlor@ucd.ie
href="mailto:goodwin.lawlor@ucd.ie">goodwin.lawlor@ucd.ie</A> ; <A
title=vtkusers@vtk.org href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, November 17, 2003 10:22
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: vtkOBBTree vs.
vtkCellLocator</DIV>
<DIV><BR></DIV>
<DIV>
<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> </BLOCKQUOTE></BODY></HTML>