[vtkusers] vtkExtractPolyDataGeometry question

Cory Quammen cory.quammen at kitware.com
Thu Feb 1 09:02:39 EST 2018


Try calling

extract->PassPointsOff()

instead of

extract->PassPointsOn()

That should remove the points that are not part of the vtkPolyData output.

HTH,
Cory

On Thu, Feb 1, 2018 at 4:14 AM, Beatrix Schober
<beatrix.schober at gmail.com> wrote:
> Hi!
>
> I want to get a subset of vtkPolyData with vtkExtractPolyDataGeometry:
>
> VTK_CREATE(vtkBox, box);
> box->SetBounds(values);
>
> VTK_CREATE(vtkExtractPolyDataGeometry, extract);
> extract->SetInputConnection(appendFilter->GetOutputPort());
> extract->SetImplicitFunction(box);
> extract->ExtractBoundaryCellsOn();
> extract->PassPointsOn();
> extract->Update();
>
> vtkPolyData* tmp = extract->GetOutput();
>
> The "new" vtkPolyData still has the same number of points as the original
> vtkPolyData, which confuses me, because the correct subset is displayed.
>
> I guess I understand the filter wrong? How can I get a subset as new
> vtkPolyData?
>
> Thank you very much!
>
> _______________________________________________
> 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:
> https://vtk.org/mailman/listinfo/vtkusers
>



-- 
Cory Quammen
Staff R&D Engineer
Kitware, Inc.


More information about the vtkusers mailing list