[vtk-developers] Problem with vtkAppendPolyData

David Doria daviddoria at gmail.com
Wed Jan 12 20:25:03 EST 2011


On Wed, Jan 12, 2011 at 8:19 PM, FUJII Kenji <kenji.fujii at noe.co.jp> wrote:
> David,
>
> Thanks for your reply.
>
> I corrected the code according to the content of the link.
> The code is as follows.
> #------------------------------------------------------------
> append = vtk.vtkAppendPolyData()
> append.AddInputConnection(polyData1.GetProducerPort())
> append.AddInputConnection(polyData2.GetProducerPort())
> append.AddInputConnection(polyData3.GetProducerPort())
> append.Update()
>
> cleanFilter = vtk.vtkCleanPolyData()
> cleanFilter.SetInputConnection(append.GetOutputPort())
> cleanFilter.Update()
>
> print cleanFilter.GetOutput().GetNumberOfPoints()
> #------------------------------------------------------------
> But it did'nt work...The number of points that AppendPolyData  has is still
> zero.
> For your information, I confirm that 3 PolyData could have points and
> scalars accurately as well.
> For example,
> polyData1.GetNumberOfPoints() = non zero positive value.

Could you send us some compilable code that demonstrates your problem?
And if you are trying to combine three vtp files, please also include
the files (if they are large, upload them somewhere and send a link).

For future reference, this is the developers list (for discussing VTK
class internals). This question is better suited to the vtk-users
list.

David



More information about the vtk-developers mailing list