[vtkusers] Finding line cells that intesect a plane.
Wesley Brooks
wesbrooks at gmail.com
Thu Jan 13 08:53:35 EST 2005
Dear Users,
Further to my last email I've come across vtkExtractGeometry which
seems to me close to what I need. I've got the following so far,
butchered from online examples and previous code.
cutplane = vtk.vtkPlane()
cutplane.SetNormal(0,0,1)
cutplane.SetOrigin(0,0,z)
union = vtk.vtkImplicitBoolean()
union.AddFunction(cutplane)
union.AddFunction(cutplane)
union.SetOperationType(0)
extract = vtk.vtkExtractGeometry()
extract.SetInput(meshdata)
extract.ExtractBoundaryCellsOn()
extract.SetImplicitFunction(union)
linestripper = vtk.vtkStripper()
linestripper.SetInput(extract.GetOutput())
linestripper.GetOutput()
numcells = linestripper.GetNumberOfCells()
The input - 'meshdata' - is PolyData and for the rest of my code I
need the last item - 'linestripper' - to be a vtkPOlyData item and I'm
getting vtkUnstructuredGrid.
At present I'm using a method that searches through all of the cells
to find the point intersections on different planes. Will utalising
the above method speed up the process or does the extract geometry
filter also search through all the cells which I assume would actually
add to the processing time?
Thanks again in advance to any help!
Yours Faithfully,
Wesley Brooks
More information about the vtkusers
mailing list