It may be that you do not have cell data . If you do not have any faces you probably need to create cells as points and add it to polydata using SetVerts.<br><br><div class="gmail_quote">On Thu, May 10, 2012 at 6:04 PM, cel02000 <span dir="ltr"><<a href="mailto:cel02000@yahoo.com" target="_blank">cel02000@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear all,<br>
<br>
I have two vtkPolyData that I need to append. I have searched online but<br>
could not find any solution to my problem. The problem is after appending<br>
the vtkPolyData the number of points becomes zero and the two datasets are<br>
not appended properly.<br>
<br>
Actually, I have created two vtkPolyData manually by inserting the points by<br>
the function InsertPoints and adding an array named Hills having three<br>
components and set the value of the tuples by SetTuple1 inside the three<br>
nested for-loops. The points of the created vtkPolyData are created similar<br>
to the way vtkStructuredGrid data are created.<br>
<br>
vtkSmartPointer<vtkAppendPolyData> appendFilter =<br>
vtkSmartPointer<vtkAppendPolyData>::New();<br>
appendFilter->AddInput( polyData1 );<br>
appendFilter->AddInput( polyData2 );<br>
appendFilter->Update();<br>
<br>
polyDataAppended = appendFilter->GetOutput();<br>
<br>
I don't have this problem in appending the vtkPolyData which are obtained<br>
from VTK readers. In addition, when I add only one of the vtkPolyData to<br>
appendFilter, polyDataAppended contains the right information. However,<br>
adding the two gives me problem. Is there any problem with my polyData1 and<br>
polyData2? Please find their information below.<br>
<br>
I would appreciate it if someone could help me with this?<br>
Thanks.<br>
<br>
<br>
<br>
*polyData1 is as follows:*<br>
/vtkPolyData (000000000267F460)<br>
Debug: Off<br>
Modified Time: 1467<br>
Reference Count: 1<br>
Registered Events: (none)<br>
Source: (none)<br>
Information: 0000000002612780<br>
Data Released: False<br>
Global Release Data: Off<br>
UpdateTime: 0<br>
Field Data:<br>
Debug: Off<br>
Modified Time: 1450<br>
Reference Count: 1<br>
Registered Events: (none)<br>
Number Of Arrays: 0<br>
Number Of Components: 0<br>
Number Of Tuples: 0<br>
Number Of Points: 210<br>
Number Of Cells: 0<br>
Cell Data:<br>
Debug: Off<br>
Modified Time: 1453<br>
Reference Count: 1<br>
Registered Events: (none)<br>
Number Of Arrays: 0<br>
Number Of Components: 0<br>
Number Of Tuples: 0<br>
Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )<br>
Interpolate Flags: ( 1 1 1 1 1 0 0 1 )<br>
Pass Through Flags: ( 1 1 1 1 1 1 1 1 )<br>
Scalars: (none)<br>
Vectors: (none)<br>
Normals: (none)<br>
TCoords: (none)<br>
Tensors: (none)<br>
GlobalIds: (none)<br>
PedigreeIds: (none)<br>
EdgeFlag: (none)<br>
*Point Data:<br>
Debug: Off<br>
Modified Time: 1462<br>
Reference Count: 1<br>
Registered Events: (none)<br>
Number Of Arrays: 1<br>
Array 0 name = Hills<br>
Number Of Components: 3<br>
Number Of Tuples: 210*<br>
Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )<br>
Interpolate Flags: ( 1 1 1 1 1 0 0 1 )<br>
Pass Through Flags: ( 1 1 1 1 1 1 1 1 )<br>
Scalars: (none)<br>
Vectors: (none)<br>
Normals: (none)<br>
TCoords: (none)<br>
Tensors: (none)<br>
GlobalIds: (none)<br>
PedigreeIds: (none)<br>
EdgeFlag: (none)<br>
*Bounds:<br>
Xmin,Xmax: (-1, 1)<br>
Ymin,Ymax: (-1, 1)<br>
Zmin,Zmax: (-1, 1)<br>
Compute Time: 1469<br>
Number Of Points: 210*<br>
Point Coordinates: 0000000001DE40E0<br>
Locator: 0000000000000000<br>
Number Of Vertices: 0<br>
Number Of Lines: 0<br>
Number Of Polygons: 0<br>
Number Of Triangle Strips: 0<br>
Number Of Pieces: 1<br>
Piece: -1<br>
Ghost Level: 0<br>
/<br>
<br>
*polyData2 is as follows:*<br>
/vtkPolyData (0000000002678730)<br>
Debug: Off<br>
Modified Time: 1489<br>
Reference Count: 1<br>
Registered Events: (none)<br>
Source: (none)<br>
Information: 0000000002678AD0<br>
Data Released: False<br>
Global Release Data: Off<br>
UpdateTime: 0<br>
Field Data:<br>
Debug: Off<br>
Modified Time: 1472<br>
Reference Count: 1<br>
Registered Events: (none)<br>
Number Of Arrays: 0<br>
Number Of Components: 0<br>
Number Of Tuples: 0<br>
Number Of Points: 720<br>
Number Of Cells: 0<br>
Cell Data:<br>
Debug: Off<br>
Modified Time: 1475<br>
Reference Count: 1<br>
Registered Events: (none)<br>
Number Of Arrays: 0<br>
Number Of Components: 0<br>
Number Of Tuples: 0<br>
Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )<br>
Interpolate Flags: ( 1 1 1 1 1 0 0 1 )<br>
Pass Through Flags: ( 1 1 1 1 1 1 1 1 )<br>
Scalars: (none)<br>
Vectors: (none)<br>
Normals: (none)<br>
TCoords: (none)<br>
Tensors: (none)<br>
GlobalIds: (none)<br>
PedigreeIds: (none)<br>
EdgeFlag: (none)<br>
*Point Data:<br>
Debug: Off<br>
Modified Time: 1484<br>
Reference Count: 1<br>
Registered Events: (none)<br>
Number Of Arrays: 1<br>
Array 0 name = Hills<br>
Number Of Components: 3<br>
Number Of Tuples: 720*<br>
Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )<br>
Interpolate Flags: ( 1 1 1 1 1 0 0 1 )<br>
Pass Through Flags: ( 1 1 1 1 1 1 1 1 )<br>
Scalars: (none)<br>
Vectors: (none)<br>
Normals: (none)<br>
TCoords: (none)<br>
Tensors: (none)<br>
GlobalIds: (none)<br>
PedigreeIds: (none)<br>
EdgeFlag: (none)<br>
*Bounds:<br>
Xmin,Xmax: (-1.5, 1.5)<br>
Ymin,Ymax: (-1.5, 1.5)<br>
Zmin,Zmax: (-1.5, 1.5)<br>
Compute Time: 1491<br>
Number Of Points: 720*<br>
Point Coordinates: 0000000001DE2DF0<br>
Locator: 0000000000000000<br>
Number Of Vertices: 0<br>
Number Of Lines: 0<br>
Number Of Polygons: 0<br>
Number Of Triangle Strips: 0<br>
Number Of Pieces: 1<br>
Piece: -1<br>
Ghost Level: 0/<br>
<br>
*The resulted vtkPolyData, named polyDataAppended, is as follows:*<br>
/vtkPolyData (00000000026AC490)<br>
Debug: Off<br>
Modified Time: 1732<br>
Reference Count: 2<br>
Registered Events: (none)<br>
Source: (none)<br>
Information: 00000000026AC650<br>
Data Released: False<br>
Global Release Data: Off<br>
UpdateTime: 1736<br>
Release Data: Off<br>
UpdateExtent: Not Initialized<br>
Update Number Of Pieces: 1<br>
Update Piece: 0<br>
Update Ghost Level: 0<br>
MaximumNumberOfPieces: -1<br>
RequestExactExtent: Off<br>
Field Data:<br>
Debug: Off<br>
Modified Time: 1722<br>
Reference Count: 1<br>
Registered Events: (none)<br>
Number Of Arrays: 0<br>
Number Of Components: 0<br>
Number Of Tuples: 0<br>
Number Of Points: 0<br>
Number Of Cells: 0<br>
Cell Data:<br>
Debug: Off<br>
Modified Time: 1730<br>
Reference Count: 1<br>
Registered Events: (none)<br>
Number Of Arrays: 0<br>
Number Of Components: 0<br>
Number Of Tuples: 0<br>
Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )<br>
Interpolate Flags: ( 1 1 1 1 1 0 0 1 )<br>
Pass Through Flags: ( 1 1 1 1 1 1 1 1 )<br>
Scalars: (none)<br>
Vectors: (none)<br>
Normals: (none)<br>
TCoords: (none)<br>
Tensors: (none)<br>
GlobalIds: (none)<br>
PedigreeIds: (none)<br>
EdgeFlag: (none)<br>
*Point Data:<br>
Debug: Off<br>
Modified Time: 1732<br>
Reference Count: 1<br>
Registered Events: (none)<br>
Number Of Arrays: 0<br>
Number Of Components: 0<br>
Number Of Tuples: 0*<br>
Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )<br>
Interpolate Flags: ( 1 1 1 1 1 0 0 1 )<br>
Pass Through Flags: ( 1 1 1 1 1 1 1 1 )<br>
Scalars: (none)<br>
Vectors: (none)<br>
Normals: (none)<br>
TCoords: (none)<br>
Tensors: (none)<br>
GlobalIds: (none)<br>
PedigreeIds: (none)<br>
EdgeFlag: (none)<br>
*Bounds:<br>
Xmin,Xmax: (1, -1)<br>
Ymin,Ymax: (1, -1)<br>
Zmin,Zmax: (1, -1)<br>
Compute Time: 1748<br>
Number Of Points: 0*<br>
Point Coordinates: 0000000000000000<br>
Locator: 0000000000000000<br>
Number Of Vertices: 0<br>
Number Of Lines: 0<br>
Number Of Polygons: 0<br>
Number Of Triangle Strips: 0<br>
Number Of Pieces: 1<br>
Piece: 0<br>
Ghost Level: 0/<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/vtkAppendPolyData-problem-after-appending-manually-created-vtkPolyData-tp5701607.html" target="_blank">http://vtk.1045678.n5.nabble.com/vtkAppendPolyData-problem-after-appending-manually-created-vtkPolyData-tp5701607.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br>