[vtkusers] number of points in the output increases 10 fold with use of vtkNonMergingPointLocator in vtkClipDataSet filter
Bill Lorensen
bill.lorensen at gmail.com
Thu Jun 23 12:04:25 EDT 2016
The clip algorithm will process each polygon inside the clip region
and produce ol\ne point per polygon vertex. Without merging, each
polygon will produce N point, where N is the number of vertices in the
polygon.
On Thu, Jun 23, 2016 at 10:42 AM, sreeram <sayala at ni.com> wrote:
> I am using vtkNonMergingPointLoactor with vtkClipDataSet filter. This is to
> prevent the filter stripping the duplicate nodes I have added. Here is the
> code snippet.
>
> pPlane->SetNormal(&vdNormal[0]);
> pPlane->SetOrigin(&vdOrigin[0]);
>
> auto npts = pInput->GetDS()->GetNumberOfPoints();
> auto pClipper = vtkSmartPointer<vtkClipDataSet>::New();
> pClipper->SetClipFunction(pPlane);
> pClipper->SetInputData(pInput->GetDS());
> auto locator = vtkSmartPointer<vtkNonMergingPointLocator>::New();
> pClipper->SetLocator(locator);
> pClipper->Update();
> pOutput->Set(pClipper->GetOutput());
> auto npts2 = pOutput->GetDS()->GetNumberOfPoints();
>
> For a particular dataset, the number of points in the input dataset is 1546.
> Without using locator, the output contains 1488 points.
>
> The filter is removing 58 duplicate nodes I have added. These nodes are
> required for rendering purpose.
>
> Using the locator (vtkNonMergingPointLocator), the output contains 26552
> points.
>
> I expect to see 1546 points in the output with sue of
> vtkNonMergingPointLocator.
>
> Can anyone tell what is wrong.
>
> thanks,
>
> Sreeram
>
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/number-of-points-in-the-output-increases-10-fold-with-use-of-vtkNonMergingPointLocator-in-vtkClipDatr-tp5738882.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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:
> http://public.kitware.com/mailman/listinfo/vtkusers
--
Unpaid intern in BillsBasement at noware dot com
More information about the vtkusers
mailing list