(pv.GetCellType(), pv.GetPointIds())Īnd the calling code: def test_vtkPolyVertexCloud_writeToFile(): In calling points: numpy array of 3d point coords - points.shape = (npoints, data: scalar-valued data belonging to each point - data.shape = (npoints,)Īssert(points.shape = 3) # make sure 3d points passed inĪssert(data.shape = npts) # make sure same number of data, points ().SetScalars(self.values)ĭef add_polyVertex_cell(self, points, data):Īdds points according to user-supplied numpy arrays, for convenience and to eliminate loops """ save each finite element as a set of polyvertices, but lose cell information """ I imagine the finite element community must commonly render unstructured volume data, so this is surprising.Īnd the source code used to write out the VTK file in Python: class VtkPolyVertCloud(object): However, I seem to be unable to find documentation for how to do this. I am looking for paraview to linearly interpolate the solution between the points for each cell, the way it would if I provide an Image (Uniform Rectilinear Grid) from a data file: However, when I choose the "Volume" representation, rather than points, the points simply disappear, without any volume rendering. I can load the file into Paraview and view the output as points: These are meant to represent points where the value of the numerical solution is known in space (quadrature points for a finite element, for example). I have built a *.vtu VTK unstructured grid file containing 2 cells consisting of 10 PolyVertex objects with scalar data associated with each point. I would like to volumetrically render 3D scalar data in Paraview, and I'm not sure if my inability to do so is incorrect usage of VTK or Paraview.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |