[vtk-developers] implementing vtkPolyData::ComputeBounds() ?
Lisa Sobierajski Avila
lisa.avila at kitware.com
Mon Jul 31 09:54:56 EDT 2000
Hi Sebastien,
I think it is more correct to have the vtkPolyData::ComputeBounds()
implemented than to simply use the bounds of all points. Unless someone
thinks this isn't the case, I would suggest implementing it, test it, then
check it in - and we'll need to keep an eye on the timing for a few days to
make sure it doesn't significantly slow anything down. I don't think it
should since bounds only need to be recomputed when data is changed.
Lisa
At 12:49 PM 7/29/00, Sebastien BARRE wrote:
>Hi
>
>I was wondering why vtkPolyData::ComputeBounds() is not implemented ? Is
>it OK if I take care of this ?
>
>Rational : suppose that given a polygonal object A, I use a
>vtkClipPolyData filter to extract two other polygonal objects B, and C,
>which will have different topologies (and most probably different extents).
>
>If I query the bounds of B and C using GetBounds(), or use vtkOulineFilter
>to display very simple bounding boxes, I'll get ... the bounds of A. This
>is no surprise because both A, B and C share the *same* points
>(vtkPoints), and as A, B, C are vtkPolyData derived from vtkPointSet,
>GetBounds() use vtkPointSet::ComputeBounds(), which computes the bounds by
>iterating over the *points*.
>
>I'm a bit confused with that. If the only "visible" thing (or real data)
>is defined in vtkPolyData by its cells, I guess ComputeBounds() should
>reflect this too, am I right ?
>
>I used to circumvent the problem by defining a function in Tcl, but it's
>soooooooo slow (GetCellsBounds() is not available in Tcl).
>
>Therefore, may I implement this vtkPolyData::ComputeBounds() feature ? The
>bounds will be much more accurate. I'm asking first because GetBounds() is
>used in so many files that I may have missed the "big picture".
>
>Thanks
>_______________________________________________
>vtk-developers mailing list
>vtk-developers at public.kitware.com
>http://public.kitware.com/mailman/listinfo/vtk-developers
More information about the vtk-developers
mailing list