[vtkusers] Create PolyData in vtk.js
marf
marvin.huber at basf.com
Tue Jul 17 09:39:13 EDT 2018
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
More information about the vtkusers
mailing list