[Paraview] using user selected cells in the python shell

2017-04-22 Thread Richardson CFD
pdi = self.GetInput() pdo = self.GetOutput() newPoints = vtk.vtkPoints() numPoints = pdi.GetNumberOfPoints() for i in range(0, numPoints): coord = pdi.GetPoint(i) x, y, z = coord[:3] x = x - 1.0 y = y + 0.0 z = z + 0.0 newPoints.InsertPoint(i, x, y, z) pdo.SetPoints(newPoints) "

[Paraview] python shell command to invert selection

2017-04-20 Thread Richardson CFD
Is there a python shell command to "invert selection", like in the GUI? -- Richardson CFD http://richardsoncfd.weebly.com ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opens

[Paraview] using selected cells in the python programmable filter

2017-04-19 Thread Richardson CFD
How do you operate on screen selected cells (Select Cells On) from within the Python Programmable Filter? -- Richardson CFD http://richardsoncfd.weebly.com ___ Powered by www.kitware.com Visit other Kitware open-source projects at http

[Paraview] python script does not run in macro

2016-05-11 Thread Richardson CFD
If I have some python script such as the double helix example attached, it works (runs) in Paraview as programmable filter or programmable source, but it doesn't run in tools > python shell, or as a macro... why is this? -- Richardson CFD https://sites.google.com/site/garcfd

Re: [Paraview] mapping scalars onto surface geometry

2016-02-07 Thread Richardson CFD
terpolation 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 > Da

[Paraview] mapping scalars onto surface geometry

2016-02-06 Thread Richardson CFD
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 wi

[Paraview] mapping scalars onto surface geometry

2016-02-05 Thread Richardson CFD
How do you map a scalar field onto a surface geometry (STL file) please? I have a structured 3d array of values such as velocity, density, temperature etc... and I want to map that onto a surface geometry, such as a motorbike for example. I have tried the "Resample with Dataset" method, (input=s