[vtkusers] GetEdgeData->Reset() breaks EdgeData

David Doria daviddoria+vtk at gmail.com
Wed Mar 31 10:57:37 EDT 2010


On Wed, Mar 31, 2010 at 10:34 AM, Aashish Chaudhary
<aashish.chaudhary at kitware.com> wrote:
> Quickly looking I am not sure whats wrong. In my code I cannot duplicate
> this kind of behavior. The lines you posted is exactly what you doing? If
> thats the case I don't know.
>
> May be you can post a small program which reproduces this problem?
>
> ~Regards,
> Aashish

Phew! After *hours* of debugging, the problem was (not in any of the
code I posted) that when I DeepCopy()-ed an array:

  vtkSmartPointer<vtkDoubleArray> weights =
      vtkSmartPointer<vtkDoubleArray>::New();
  weights->DeepCopy(originalWeights);

I didn't set the name of the array to match:

  weights->SetName("Weights");

I guess I assumed that would have happened in the DeepCopy()??

Oh well, lesson learned!

Thanks,

David



More information about the vtkusers mailing list