[vtkusers] problems with points id -- unstructuredGrid to polydata
David E DeMarle
dave.demarle at kitware.com
Wed Oct 1 16:26:08 EDT 2008
Filters may have to reorder the points arbitrarily to do their work.
However you can add an idtype array with a unique id for each point
and mark it as the active global ids (in the same way that you mark an
array as the active scalars), and the contents of that array will be
preserved. The net result is that you can look into the globalids
array and determine where each result came from originally.
cheers,
Dave DeMarle
On Wed, Oct 1, 2008 at 4:18 PM, pam <papereyra at gmail.com> wrote:
> Hi, I'm working with an vtkUnstructuredGrid, when I insert points I
> give an orden but when I copy this to a polydata the orden is change.
>
> this is my orden :
>
> pts=vtkPoints::New();
> pts->InsertPoint(0,1,1,1);
> pts->InsertPoint(1,16,10,1);
> pts->InsertPoint(2,17,11,1);
> pts->InsertPoint(3,20,12,10);
> pts->InsertPoint(4,15,12,1);
>
> profile=vtkPolyData::New();
> profile->SetPoints(pts);
>
> delny=vtkDelaunay3D::New();
> delny->SetInput(profile);
> delny->Update();
> delny->SetTolerance(0.00000001);
> delny->BoundingTriangulationOff();
>
> ----- Here I assign the unstructuredgrid to a polydata
> extract=vtkExtractEdges::New();
> extract->SetInput(delny->GetOutput());
>
> So My order is change to
>
> 1,1,1 ---> before 0
> 20,12,10 --> before 3
> 16,10,1 --> before 1
> 15,12,1 -->before 4
> 17,11,1 -->before 2
>
> I would like to know if something to set to keep the initial order of
> the points.
>
> Thanks
>
> Pamela
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list