[vtkusers] vtkm help with using the CleanGrid filter

Allie Vacanti allison.vacanti at kitware.com
Fri Jun 28 09:41:32 EDT 2019

On Fri, Jun 28, 2019 at 6:21 AM sunayanag <sunayanag at gmail.com> wrote:

> Thanks for your reply Allie, I looked into the vtkmCleanGrid.cxx file and
> tried to reproduce the code  :
> auto fieldsFlag = tovtkm::FieldsFlag::None;
> vtkm::cont::DataSet in = tovtkm::Convert(vtkMesh, fieldsFlag);
>  //apply the filter
>  vtkmInputFilterPolicy policy;
>  vtkm::filter::CleanGrid filter;
> filter.SetCompactPointFields(false);
> auto result = filter.Execute(in, policy);
> and end up getting the following error :
> include\vtk-8.2\vtkm/internal/ListTagDetail.h(207): error C2027: use of
> undefined type 'vtkm::cont::vtkmCellSetExplicitAOS'

You can include the file "vtkmCellSetExplicit.h" to fix that. You might
also need to include "vtkmCellSetSingleType.h" if you see errors about
single type cellsets being undefined.

> I also tried using the directly the vtkmCleanGrid class, in this case it
> worked where the output was of type vtkUnstructuredGrid which I converted
> back to vtkPolyData using the vtkDataSetSurfaceFilter.

If you use the vtkm filter directly, it should work to use the
fromvtk::Convert method from Accelerators/Vtkm/vtkmlib/PolyDataConverter.h
to skip that extra step.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20190628/609bba2c/attachment.html>

More information about the vtkusers mailing list