Thanks David,<br><br>Now I understand logical use for create data with transformation.<br><br>I use a vtkTransform then vtkTransformPolyDataFilter on each data before create a vtkActor, therefore I can apply rotation or translation.<br>
And, finally, I create a vtkAppendPolyData with all data. Then it's very easy to create a vtkXMLPolyDataWriter with vtkAppendPolyData output!<br><br>=> My generated vtp file work very well in Paraview!<br><br><br><div class="gmail_quote">
2011/11/22 David Doria <span dir="ltr"><<a href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="HOEnZb"><div class="h5">On Tue, Nov 22, 2011 at 10:27 AM, Ka Lo <<a href="mailto:kalogr@gmail.com">kalogr@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> I'm trying to write some code to export a set of vtkActor build in a<br>
> vtkRenderer to Paraview.<br>
> I think there is something I don't understand for export in a compatible way<br>
> to Paraview.<br>
><br>
> For example, I have 300 vtkActor, each vtkActor have a vtkMapper with an<br>
> input of vtkCubeSource type.<br>
> And all vtkActor are in the space with size, position, orientation...<br>
> I wish export my complete space (all vtkActor and theirs positions, size and<br>
> orientation) in a file then open this file in Paraview for visualise all<br>
> vtkActor in the space.<br>
><br>
> I found several classes for export to output VTK files but it's only for one<br>
> vtkActor. For example, ".vtu" file with vtkXMLUnstructuredGridWriter or<br>
> ".vtp" file with vtkXMLPolyDataWriter...<br>
> I have no constraint with output file, only that the file must be read by<br>
> Paraview.<br>
><br>
> Thanks a lot.<br>
><br>
> Any help would be appreciated.<br>
><br>
> PS: sorry for my english, if you don't understand, I will try to rewrite<br>
> sentences.<br>
> --<br>
> Gregory<br>
<br>
</div></div>As far as I know, you cannot export vtkActor's at all. As you've seen,<br>
an actor is the result of passing some data (vtkPolyData, for example)<br>
through a mapper. You can only output the data, which can then be<br>
viewed in Paraview. If you want to position things in the scene in VTK<br>
and have them be in the same place in Paraview, you'll have to apply<br>
transforms to the data itself rather than to the actors.<br>
<br>
You can use vtkAppendPolyDataFilter to concatenate all of the data<br>
before exporting it to a single vtp file.<br>
<span class="HOEnZb"><font color="#888888"><br>
David<br>
</font></span></blockquote></div><br>