[vtkusers] vtkPolyData to a vtkUnstructuredGrid

Allen Sanderson allen at sci.utah.edu
Tue Jul 15 19:47:05 EDT 2014


Hi Dave,

Thanks for the reply. I dug into the issue a bit more and found the conversion was working fine but a later operation seemed to not return any cell points thus I was thinking the conversion was not working. I just did some more digging and found the issue. In a nut shell an assumption was made that the unstructured grid would contain only polygonal cells (tris, hex, tets, etc) thus a max of eight vertices. A polyline does not fit that assumption. Thus memory got stomped on but did not cause a seg fault.  Thus the classic chasing ones tail was the issue. So no bug but some bad code on our part.

Cheers,

Allen


Allen Sanderson
SCI Institute
University of Utah
www.sci.utah.edu



On Jul 15, 2014, at 8:20 AM, David E DeMarle <dave.demarle at kitware.com> wrote:

> Hey Allen!
> 
> Probably a bug in the append filter, it must not be converting with polylines type cells correctly for some reason.
> 
> As Burlen said it would help if you could post a small example data set. That will make it trivial to replicate the problem and fix it.
> 
> Otherwise, try using a different filter to do the conversion (as a side effect, like append does). Threshold is my habitual choice for * to unstructured conversion.
> 
> 
> 
> 
> David E DeMarle
> Kitware, Inc.
> R&D Engineer
> 21 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4909
> 
> 
> On Fri, Jul 11, 2014 at 6:08 PM, Burlen Loring <burlen.loring at gmail.com> wrote:
> It would help if you post an example with some data so that we can see exactly what you're doing.
> 
> 
> On 07/11/2014 01:29 PM, Allen Sanderson wrote:
>> 
>> Hello,
>> 
>> I have a vtkPolyData structure that contains vtkPolyLines or vertex(s). In the course of the coding the vtkPolyData needs to be converted to a vtkUnstructuredGrid. I have used the example here using the append filter:
>> 
>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataToUnstructuredGrid
>> 
>> However, no lines come across only points. I have also iterated through each cell and moved the point id list over with the same results, no lines
>> 
>> As such, I am wondering why lines might not be moved over. 
>> 
>> Cheers,
>> 
>> Allen
>> 
>> 
>> Allen Sanderson
>> SCI Institute
>> University of Utah
>> www.sci.utah.edu
>> 
>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> 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
>> 
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers
> 
> 
> _______________________________________________
> 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
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
> 
> 
> _______________________________________________
> 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
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140715/efccff8e/attachment.html>


More information about the vtkusers mailing list