[vtkusers] Create PolyData in vtk.js

Sebastien Jourdain sebastien.jourdain at kitware.com
Tue Jul 17 11:54:48 EDT 2018


I was starting to answer your previous email but I'm glad you figure it out.

But I'm not sure what it your new question.
1) How to add data to the polydata?
2) How to render an array from a polydata for both points and cells?

Seb

PS: You could create an issue for that topic on vtk.js is you want too.

On Tue, Jul 17, 2018 at 7:39 AM marf <marvin.huber at basf.com> wrote:

> Ok, I solved it now, by taking the connectivityarray and translating it
> into
> a format for polyData which kind of looks like this
>
> numberOfPoints idOfPoint1 idOfPoint2 idOfPoint3 numberOfPoints idOfPoint1
> idOfPoint2 idOfPoint3
>
> e.g.
> polys = [3, 0, 2, 1, 3, 1, 2, 3, 3......] (this would only be triangles)
> points = [0.1, 0.5, 9, 0.5]
>
> Then I passed this to the polydata via
>
> polydata.getPolys().setData(polys);
> polydata.getPoints().setData(points);
>
> and provided it as the modeloutput with
> model.output[0] = polydata;
>
> So this worked nicely, but there is also more information that I would have
> to display by coloring cells or points, can someone help with that please?
>
>
>
> --
> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
> _______________________________________________
> 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://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180717/03d66f3a/attachment.html>


More information about the vtkusers mailing list