Hello everyone,<br><br>I have a vtkPolyData and I wanna to get its mesh. From the instance I have, Im able to get the normals, texture coordinates and the index of the triangles but, Im not able to get the vertices.<br>The TCoord and Normals I found inside the PointData. The vectors in the PointData is None. Inside the GetPolygons I was only able to get the index of the triangles.<br>
<br><br>My code is currently simple (python):<br><br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">cylinder = vtk.vtkCylinderSource()<br>...<br>
triangulate = vtk.vtkTriangleFilter()<br>triangulate.SetInputConnection(cylinder.GetOutputPort(0))<br>triangulate.Update()<br>polydata = triangulate.GetOutput(0)<br></blockquote><br><br>Im also calling the methods Render() and Initialize() of the vtkRenderWindowInteractor before getting the information from the polydata.<br>
The window with my visualization shows me my code isnt wrong. How can I get the vertices of the Cylinder(PolyData)?<br><br>Thanks<br><br>Wendel B Silva<br><br><br><br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">
ps.: When I print the PolyData I get the following information:<br><br>vtkPolyData (0x2d46000)<br> Debug: Off<br> Modified Time: 1509<br> Reference Count: 2<br> Registered Events: (none)<br> Source: (none)<br> Information: 0x2d433f0<br>
Data Released: False<br> Global Release Data: Off<br> UpdateTime: 1510<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: 1374<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: 20<br> Number Of Cells: 16<br> Cell Data:<br> Debug: Off<br> Modified Time: 1382<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: 1509<br> Reference Count: 2<br> Registered Events: (none)<br>
Number Of Arrays: 2<br> Array 0 name = Normals<br> Array 1 name = TCoords<br> Number Of Components: 5<br> Number Of Tuples: 20<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: <br> Debug: Off<br> Modified Time: 1346<br> Reference Count: 2<br> Registered Events: (none)<br>
Name: Normals<br> Data type: float<br> Size: 60<br> MaxId: 59<br> NumberOfComponents: 3<br> Information: 0<br> Name: Normals<br> Number Of Components: 3<br> Number Of Tuples: 20<br>
Size: 60<br> MaxId: 59<br> LookupTable: (none)<br> Array: 0x2d47fe0<br> Bounds: <br> Xmin,Xmax: (-0.161803, 0.2)<br> Ymin,Ymax: (-0.2, 0.2)<br> Zmin,Zmax: (-0.190211, 0.190211)<br> Compute Time: 1540<br>
Number Of Points: 20<br> Point Coordinates: 0x2d47720<br> Locator: 0<br> Number Of Vertices: 0<br> Number Of Lines: 0<br> Number Of Polygons: 16<br> Number Of Triangle Strips: 0<br> Number Of Pieces: 1<br> Piece: 0<br>
Ghost Level: 0<br></blockquote><br>