[Paraview] Copy sources repeatedly with Programmable Filter

Magician f_magician at mac.com
Sat Aug 11 20:48:50 EDT 2012


Hi Hal,


Thanks for your reply.

What I want to do is:
1. Read or generate one source (Box, Sphere, or other PolyData)
2. Copying it repeatedly (hundreds of copies, along both x and y axes)

So far I wrote a VTK file including all sources,
but now I want to to change the numbers, sizes and pitches on ParaView.


Magician


On 2012/08/12, at 1:00, paraview-request at paraview.org wrote:

> Message: 4
> Date: Sat, 11 Aug 2012 11:05:05 -0400
> From: Hal Canary <hal at cs.unc.edu>
> Subject: Re: [Paraview] Copy sources repeatedly with Programmable
> 	Filter
> To: paraview at paraview.org
> Message-ID: <502674A1.2060502 at cs.unc.edu>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> On 08/11/2012 09:16 AM, Magician wrote:
>> I'm trying to copy vtkPolyData sources with Programmable Filter.
>> My latest code is here:
>>> input = self.GetPolyDataInput()
>>> output = self.GetPolyDataOutput()
>>> points = vtk.vtkPoints()
>>> for i in range(0, input.GetNumberOfPoints()):
>>>     point_i = input.GetPoint(i)
>>>     x, y, z = point_i[:3]
>>>     z = z + 2.0
>>>     points.InsertPoint(i, x, y, z)
>>> output.SetPoints(points)
>> 
>> And now I want to copy them repeatedly with only one filter.
>> (Ex: 10 blocks at intervals.)
>> How to do it?
> 
> It sounds like you want to select all of the sources and apply the 
> Append Geometry filter.



More information about the ParaView mailing list