![]() The scalar called 'First Property' or the scalar called 'Second Property' can be chosen from the 'Display' tab of the 'tube' filter under the 'Color by' option. The scalar data can be visualized using filters such as the 'tube' filter where the scalar value is represented as a color. It generates a helix with two sets of scalar data defined along the helix. This is intended as the Python script for a 'Programmable Source'. # tet orientation than VTK, and wish to use the vtkMeshQuality filter). # This filter flips the tetrahedra (useful, if you have different convention of # This filter computes the radius h of the tetrahedra in an unstructured mesh: This filter computes the volume of the tetrahedra in an unstructured mesh:.# assuming data.csv is a CSV file with the 1st row being the names names forĭata = np.genfromtxt("data.csv", dtype=None, names=True, delimiter=',', autostrip=True) # Refer to numpy documentation for genfromtxt() for details on # We will use numpy to read the csv file. #skip first line, presumed to be a headerįor pos,word in enumerate(line.split(",")):Īrray = pdo.GetPointData().GetArray(pos-3)Īnother example, this time using numpy and reading the CSV to a vtkTable. The file is of the form (where :įilename = os.path.normcase("c:/datafile.txt").This source reads a text file and produces a data set.These will not directly work from the python shell or pvpython. Note: These scripts are meant to be used at values for the Script paramaters for Programmable Filter or Programmable Source as identified by the title. It would be nice, if you have written a possibly useful pp-filter, if you would add the code to this page. 11 Labeling common points between two datasets (Filter)Įxamples of Filters Programmed using the Python Programmable Filter.10 Producing An Unstructured Grid (Source).8 Producing Data with Timesteps (Source).1 Examples of Filters Programmed using the Python Programmable Filter.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |