[Paraview] mapping scalars onto surface geometry

Neil Srinivasan neilsrini at gmail.com
Sun Feb 7 08:43:54 EST 2016


Hi I am new to Paraview

Can you help

I have data in a CSV spreadsheet. 


It contains the xyz point coordinates of a 3D shape (20,000+ nodes). 

The file also contains the triangulation coordinates in 3 separate columns for these nodes (40000 + triangulations). These create the faces of the mesh

I can work out how to plot the points, using 

Filter—Table to points. 


How do I plot the faces?
Do the 3 columns need to be turned into an array?


And how do I colour the faces or contour them by another value (called "bi" in the spreadsheet)



here is an example of the spreadsheet

nn = node number

the 3d coordinates of the points are x, y, z

and the faces of the mesh are specified by (XYZ)

I WISH TO PLOT Points (x, y, x) , draw faces (XYZ) colour by “bi"



in matlab

it would be


trisurf(Tri,X,Y,Z,C) 


where Tri = array(XYX)

X,Y,Z = (x, y, z)

c= "bi"





nn	x	y	z	X	Y	Z	uni	bi
0	39.527	28.202	160.219	3435	19658	2764	3.86942	0.74871
1	70.804	-2.966	157.578	3161	17204	9466	6.64361	0.78373
2	48.982	-25.674	109.022	18424	17467	16955	5.02491	1.0451
3	83.514	-9.096	120.988	13600	19721	2669	4.47977	0.9348
4	-16.04	-39.749	188.467	1564	10099	10091	1.90873	0.73286
5	74.526	-3.096	174.347	21598	19018	21205	8.4263	0.70594
6	54.93	-56.347	151.496	21283	11341	18399	7.53334	2.17128
7	56.936	-20.131	186.177	1171	2723	20833	7.16118	1.44875
8	-14.627	-47.1	162.185	51	15729	15865	2.13939	0.70887
9	38.207	-59.201	147.993	9331	5851	9106	5.83457	4.32971
10	50.645	-32.04	110.418	310	3513	9121	5.3741	1.14543

Neil Srinivasan
iPhone 

> On 7 Feb 2016, at 10:15 a.m., Richardson CFD <garcfd at gmail.com> wrote:
> 
> Kenneth, wonderful - that's done the trick (see attached).
> A quick and simple solution! 
> 
> Whats the difference between an image file (and the unstructured data file that I have created)?
> 
> Thanks very much, Giles.
> 
>> On Sun, Feb 7, 2016 at 6:31 AM, Moreland, Kenneth <kmorel at sandia.gov> wrote:
>> Giles,
>> 
>> I think I've figured out your problem. The scalars data you sent me is an unstructured grid with "voxel"-type cells. One of my least favorite features of VTK is that there is a distinction between a box in an unstructured grid (called a hexahedra) and a box in a data set with structured grid (called a voxel). These two cells are essentially the same shape, but the order of the points is different.
>> 
>> The reason why I dislike this feature is that it is technically allowable to put voxel cells in an unstructured grid. However, this fouls up lots of filters that don't check for this corner case. Apparently the probe filter, which is the underlying filter for resample with dataset, is one of the filters broken for voxels. (Unless there is something else about this dataset that I am missing.) I submitted a bug about this (http://www.paraview.org/Bug/view.php?id=15982).
>> 
>> The most expedient way around this problem is to run the tetrahedralize filter on the scalars. That will convert the voxels to tetrahedra correctly, and the probe filter has no problem on that data type. The interpolation will be slightly different but close. Overall a better solution is to save your data as image data rather than convert it to an unstructured grid. The file will be smaller and the interpolation should happen correctly.
>> 
>> -Ken
>> 
>> From: Richardson CFD <garcfd at gmail.com>
>> Date: Saturday, February 6, 2016 at 5:54 AM
>> To: "paraview at paraview.org" <paraview at paraview.org>, Kenneth Moreland <kmorel at sandia.gov>
>> Subject: [EXTERNAL] mapping scalars onto surface geometry
>> 
>> Kenneth,
>> 
>> I have made two files here available for download (sphere.stl and scalars.vtk).
>> 
>> https://drive.google.com/file/d/0B4bNbYR3XwvQVlBZNlVBX0RXSkU/view?usp=sharing
>> 
>> https://drive.google.com/file/d/0B4bNbYR3XwvQTkJxRDhLb0MxZGc/view?usp=sharing
>> 
>> I hope you can give these a try using "Resample with Dataset" to see what the problem is.
>> 
>> Regards Giles.
>>  	This email has been sent from a virus-free computer protected by Avast. 
>> www.avast.com
> 
> <Capture2.PNG>
> _______________________________________________
> 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 ParaView Wiki at: http://paraview.org/Wiki/ParaView
> 
> Search the list archives at: http://markmail.org/search/?q=ParaView
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160207/63751526/attachment.html>


More information about the ParaView mailing list