[vtkusers] Is "Warning" ... "code" for "hey this is bound to crash on you in" vtkSmoothPolyDataFilter doc?

Oleksandr Malyushytsky omalyushytskyvtkuser at gmail.com
Tue Nov 6 15:00:44 EST 2018


If you found a bug, either report it (
https://gitlab.kitware.com/vtk/vtk/issues) or fix it..
Comments like "Hey what about overlooking error checking and null pointers.
" just offend people.

On Tue, Oct 30, 2018 at 2:30 PM Brian Davis <bitminer at gmail.com> wrote:

> At
>
> https://www.vtk.org/doc/nightly/html/classvtkDecimatePolylineFilter.html#details
>
> States
> WarningThis algorithm is a very simple implementation that overlooks some
> potential complexities. For example, if a vertex is multiply connected,
> meaning that it is used by multiple distinct polylines, then the extra
> topological constraints are ignored. This can produce less than optimal
> results.
>
> Is above warning code for  "crash at following lines"
>
>   void Remove(vtkIdType vertexIdx)
>   {
>     this->Size--;
>     (*(this->Vertices[vertexIdx].prev)).next =
> this->Vertices[vertexIdx].next;
>     (*(this->Vertices[vertexIdx].next)).prev =
> this->Vertices[vertexIdx].prev;
>   }
>
> in vtkDecimatePolylineFilter.cxx class vtkDecimatePolylineFilter::Polyline
>
> ?
>
> I have multiple distinct polylines housed in vtkPolyData.  I can seem to
> do batch mode operations, *not that this documented anywhere mind you*,
> with vtkParametricFunctionSource for splines and vtkSmoothPolyDataFilter
> for smoothing.... decimation errr not so much.
>
> The goal which seems to work for some vtk classes (
> vtkParametricFunctionSource  and vtkSmoothPolyDataFilter ) but not for
> others (vtkDecimatePolylineFilter) is to house a network of lines connected
> in a graph, but not a simple graph node to node, which do not represent
> some geometry say like a circle or polygon, but rather a network of paths
> and nodes.  Goal was to put in pipeline with optional decimation, smoothing
> or spline, but then goes the crash at decimation.
>
> Just what are those "potential complexities" and the bit about overlooking
> say like bad memory access.  next has a pointer, but prev pointer not so
> much (NULL).  Hey what about overlooking error checking and null pointers.
> Clearly it seems to be overlooking that.
>
> apologies for repost of "(no subject)" this one has a titile.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181106/a687ccc7/attachment.html>


More information about the vtkusers mailing list