Our code writes out XML VTK unstructured grid files, which are then visualised in ParaView. Currently, however, information about boundaries is lost during the export process (as we just write out volume cells) and has to be recovered through clipping and surface extraction filters.
To this end, I was wondering if there is any means of tagging certain points in the VTU file as belonging to a named entity? In ParaView a user could then ask for all faces which are made up of these points, thus making it trivial to extract surfaces.
You can have a
PointData array, where the value is an id of the face the point belongs to.
Then, in ParaView, you can use
Threshold to extract points and thus one surface.
Is it possible to have
Threshold just extract the faces on the relevant cells as opposed to the cells themselves? In our export (VTU writing) code, we already strip away all cells not on a boundary. What we are looking to simplify is surface extraction.
Additionally, is it possible to associate categorical names with threshold values? This would make it easier for our users to know what to dial in/select.
No, you may need to use
Extract Surface filter then.
Yes but it is less handy. You should use string values. Then the
Threshold won’t work so you have to make a selection query through
Find Data and then
But from what I see, you may want to modify your code to export MultiBlock data set, with one block per faces and one block for the inner volume. Then extraction is much easier
Apologies for the belated response.
Extract surface is what our users currently do, but it is fiddly. Consider a spanwise periodic aerofoil in a volume. Extract surface will get you the surface of the aerofoil (good) but also the boundaries of the domain (bad). Sometimes it is possible to clip these out, but only for trivial geometries. This is not the extract surface filters fault, as it does appear to be a surface, but rather a consequence of the fact that not all surfaces are of equal relevance. Hence why tagging would be useful.
I am also unsure if exporting the faces separately is viable. Our users like to do things like plot the gradient normals on surfaces. This is trivial with volume data: run a gradient filter and use the calculator plugin to get what quantities you like, then fiddle around with surface extraction. But, with face data how would this work? If you have data on a manifold you simply lack the information to obtain a normal (as opposed to tangential gradient).