2nd posting try: Help with vtkCellLocator

Audrius Stundzia adv_biologic at hotmail.com
Tue Mar 21 14:36:39 EST 2000


Dear Dr. Martin,

I haven't received any kitware mailing list e-mail for about
3 days now and the message sent below hasn't shown up either.
Is the mailing list up and working?
Is there a repository of previous mailing list e-mails?

Best regards,

Audrius Stundzia

===2nd try===

Dear vtker's,

I not having any success in locating a cell (any cell!) in a
surface described by a vtkPolyData set "myPolyData" where I've loaded points 
and vertices via SetPoints() and SetVerts(). I display the (closed) surface 
so I know where a line should intersect

Below is a code fragment

   float firstPoint[_3D];
   float secondPoint[_3D];

   firstPoint[X] = 0.0;
   firstPoint[Y] = 0.0;
   firstPoint[Z] = 0.0;

   secondPoint[X] = 200.0;
   secondPoint[Y] = 200.0;
   secondPoint[Z] = 200.0;

   float tolerance = 100.0;

   float t;

   float intersectionPoint[_3D];
   float pointCoords[_3D];

   int subID;

   int pickedCellID;

   myCellLocator = vtkCellLocator::New();
   myCellLocator->SetDataSet( myPolyData);
   myCellLocator->AutomaticOn();
   myCellLocator->CacheCellBoundsOn();
   myCellLocator->SetTolerance( tolerance);
   myCellLocator->BuildLocator();

   pickedCellID
   = myCellLocator->IntersectWithLine( firstPoint
                                     , secondPoint
                                     , tolerance
                                     , t
                                     , intersectionPoint
                                     , pointCoords
                                     , subID );

What is the meaning of t and subID. What is the difference
between the returned (?) arrays pointCoords and intersectionPoint?

t, subID, and pickedCellID are returned as 0 irrespective of
my choice of intersecting line and tolerance.
What am I goofing up?

Any help would be most appreciated. Thanks.

Regards,

Audrius


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list