projecting points onto 3D polydata

I have a curve of points, and they are in 3D, I would like to project those points onto a 3D Polydata mesh. is there a filter ?

cannot think of a specific filter but you can use vtkOBBTree.IntersectWithLine, eg. quick test:

from vedo import *
psh = ParametricShape("Boy").c("blue9")
cir = Circle(r=0.4).c("black").wireframe().rotate_x(20).z(2)
pts = []
for p in cir.points():
    pts.append(psh.intersect_with_line(p, p + [0,0,-3])[0])
show(psh, cir, Line(pts), axes=1)

1 Like