Adding Scalar Data To Triangle Mesh

Hi everyone,

I imagine this should be easy to do in ParaView, but I haven’t had any luck with it:
I have a set of files (one contains the geometry, another contains the connectivity, and another contains the scalar values that I would like to attach to the geometry). I’m able to create an object file from the geometry and connectivity files, and visualize the mesh in ParaView easily. But I don’t know how to attach my scalar data to the triangle points so I can visualize the mesh using different colormaps. Is this possible? How could I accomplish this?

Dennis

Certainly it is possible. Since ur able to visualize the mesh in PV, u can definitely attach the Scalar Data to your mesh as DataAttribute(In this case: PointData). Then select colormap as that Scalar in Display panel.
Just the same way u created the object file, I think.

Hi Yoshino,

Thanks for your response. How would I go about adding it as an DataAttribute? Is that a filter that I should apply? Because I dont see one. Or I’m I supposed to write a python script?

Thanks,
Dennis

For me, I pre-processed my dataset and save as .vtk legacy format file(file-format.pdf) with DataAttribute in it.
U could read the PDF document first to have an overall view about attribute data.

@dennis : Welcome to the community.

Please precise the format of each of your files.

@mwestphal: Thanks for your willingness to help. I was able to associate the mesh points with my scalar data. My files were: geometry.txt (x,y,z comma separated floating point numbers), connectivity.txt (x,y, z comma separated integer values, each indexing to a specific point in the geometry file), and scalar data text file (floating point values associated with each point in the geometry). I wrote a c++ script that parsed the data and I saved it in .vtp format. I opened the file in Paraview and everything looked like it is supposed to.

1 Like