[vtkusers] converting vtkPolydata to vtkUnstructuredgrid
eliya.mir at gmail.com
eliya.mir at gmail.com
Sun Dec 19 09:28:46 EST 2010
found this way to transform a polydata to unstructuredgrid:
disk = vtkDiskSource()
disk.SetInnerRadius(internal_radius)
disk.SetOuterRadius(external_radius)
disk.SetRadialResolution(radial_resolution)
disk.SetCircumferentialResolution(circumferential_resolution)
disk_polyData = disk.GetOutput()
disk_usg = vtkUnstructuredGrid()
appendFilter = vtkAppendFilter()
appendFilter.AddInput(disk_polyData)
merge = vtkExtractUnstructuredGrid()
merge.SetInputConnection(appendFilter.GetOutputPort())
merge.MergingOn()
merge.Update()
disk_usg = merge.GetOutput()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101219/106e486c/attachment.htm>
More information about the vtkusers
mailing list