Line and ConvexHull2D Intersection

Hi, I am trying to find out the intersection of a ConvexHull2D and a line using vtkPolyData and vtkLineSource objects with the help of vtkIntersectionPolyDataFilter as shown below:

intFilter = vtk.vtkIntersectionPolyDataFilter()
intFilter.SetInputData(0, hullPolyData)
intFilter.SetInputData(1, line.GetOutput())
intFilter.Update()

And I get the following error:
vtkMath.cxx:797 WARN| vtkMath::Jacobi: Error extracting eigenfunctions
vtkPointLocator.cxx:868 ERR| vtkPointLocator (0000024158EED9A0): No points to subdivide
vtkIntersectionPolyData:2410 WARN| No Intersection between objects

What am I missing here. They both lie in the XY plane and I see them intersecting when I render.

vtkPolygon.IntersectWithLine() and vtkOBBTree.IntersectWithLine() fails too. Both the line and the hull (polygon) lie in the same (XY) plane.
Any ideas?

I am guessing that since the line and polygon are in the same plane they are parallel. Which likely means that there is a tolerancing issue. I can’t say for sure without seeing code and/or data.

Hi,

Try intFilter.SetTolerance(1.0) or with some other value.

regards,

PC