[vtkusers] vtkCutter + quadratic cells + invalid heap allocation size + VTK 4.5
John Platt
jcplatt at lineone.net
Fri Apr 23 13:49:09 EDT 2004
Hi Mathieu,
Reset() didn't reduce the number of arrays but
this->PointData->Initialize();
does appear to solve the problem. As a side effect, the cutter plane now
flies along :-). I presume this should be done for the cell data also
and other quadratic cells with Subdivide().
Thanks again.
John.
-----Original Message-----
From: Mathieu Malaterre [mailto:mathieu.malaterre at kitware.com]
Sent: 23 April 2004 17:06
To: John Platt
Subject: Re: [vtkusers] vtkCutter + quadratic cells + invalid heap
allocation size + VTK 4.5
John,
Could you try adding a this->PointData->Reset() before the
CopyAllocate.
Let me know if that work
Mathieu
John Platt wrote:
> Hi Mathieu,
>
> Revision 1.23 has the same problem. The PointData object in
>
> this->PointData->CopyAllocate(inPd,27);
>
> is
>
> input->GetCell(cellId)->PointData
>
> i.e. the SINGLE instance of the QuadraticHexahedron object in the
> input's unstructured grid (I assume there is only 1 object for each
cell
> type). Each time a cell is subdivided more arrays are added to this
> object. Maybe the PointData needs flushing after each cell has been
> contoured.
>
> Thanks for your help - it's very much appreciated.
>
> John.
>
> -----Original Message-----
> From: vtkusers-admin at vtk.org [mailto:vtkusers-admin at vtk.org] On Behalf
> Of Mathieu Malaterre
> Sent: 23 April 2004 15:04
> To: John Platt
> Cc: vtkusers at vtk.org
> Subject: Re: [vtkusers] vtkCutter + quadratic cells + invalid heap
> allocation size + VTK 4.5
>
> John,
>
> Could you please give a try to the latest version of
> vtkQuadraticHexahedron ? I guess you are building your own VTK, so
this
> should be easy just go to:
>
>
http://www.vtk.org/cgi-bin/cvsweb.cgi/VTK/Common/vtkQuadraticHexahedron.
> cxx
>
> And click on 'download' right next to 'revision 1.23'. Then
> simply copy
> the file downloaded to VTK/Common. Go to your VTK bin directory and
> build it.
>
> Then try your example again. If this doesn't work, we'll have to
> work
> on an example code so that I can reproduce the bug.
>
> Thanks for your time
> Mathieu
>
> John Platt wrote:
>
>>Hi all,
>>
>>
>>
>>I am getting a memory exception cutting quadratic hexes after rotating
>
>
>>the plane widget for a few seconds.
>>
>>
>>
>>There is some unusual behaviour in the following code :
>>
>>
>>
>>void vtkQuadraticHexahedron::Subdivide(vtkPointData *inPd, vtkCellData
>
>
>>*inCd,
>>
>> vtkIdType cellId)
>>
>>{
>>
>> ...
>>
>> //Copy point and cell attribute data
>>
>> this->PointData->CopyAllocate(inPd,27);
>>
>>
>>
>>Each time the point data is copied, the number of arrays in the field
>>increases by 1. So after cutting 32 hexes I get 34 arrays (only 2 of
>>these are in the input data). This number keeps growing as the plane
>
> is
>
>>moved.
>>
>>
>>
>>I don't think this is helping. Has anybody any suggestions for a
>
> solution?
>
>>
>>
>>The particular version of vtkQuadraticHexahedron is 1.21.
>>
>>
>>
>>Apologies in advance if this has already been resolved.
>>
>>
>>
>>Many thanks,
>>
>>
>>
>>John.
>>
>>
>>
>>
>>
>>
>>
>
>
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>
More information about the vtkusers
mailing list