There might be a bug or numerical instability in the vtkIntersectionPolyDataFilter
class:
import numpy as np
import vtk
import vedo
# crashing
m1v = np.array([[17903.93947473, 11418.12995419, 2572.68075251],[17889.4353166, 11423.09300945, 2546.89320749],[17913.6520434, 11446.51421055, 2572.68075251],[17899.14788527, 11451.47726581, 2546.89320749]])
m2v = np.array([[17897.68174692, 11454.30365475, 2573.22453367],[17917.8546173, 11442.45883457, 2554.44274633],[17882.4917027, 11428.43354543, 2573.22453367],[17902.66457308, 11416.58872525, 2554.44274633]])
# not crashing
# m1v = np.array([[17903.9, 11418.1, 2572.7],[17889.4, 11423.1, 2546.9],[17913.6, 11446.5, 2572.7],[17899.1, 11451.5, 2546.9]])
# m2v = np.array([[17897.7, 11454.3, 2573.2],[17917.8, 11442.5, 2554.4],[17882.5 ,11428.4, 2573.2],[17902.7, 11416.6, 2554.4]])
faces = [[0,1,2], [3,2,1]] # 2 triangular faces
poly1 = vedo.Mesh([m1v, faces]).polydata() # vtkPolyData
poly2 = vedo.Mesh([m2v, faces]).polydata()
ipdf = vtk.vtkIntersectionPolyDataFilter()
ipdf.SetInputData(0, poly1)
ipdf.SetInputData(1, poly2)
ipdf.Update()
#vedo.show(poly1, poly2, ipdf.GetOutput(), axes=1)
It seems to be happening when the 2 interanl edges are colliding.