Markups line projection on a model

Hello,
I have markups line which passes through the surface of the model. I’d like to shift endpoint to the model surface using python. Could you help me please?

Ladislav

This works fine:

obbTree = vtk.vtkOBBTree()
obbTree.SetDataSet(modelNode.GetPolyData())
obbTree.BuildLocator()
pointsVTKintersection = vtk.vtkPoints()
code = obbTree.IntersectWithLine(startPoin, endPoint, pointsVTKintersection, None)
pointsVTKIntersectionData = pointsVTKintersection.GetData()
pointsIntersection = pointsVTKIntersectionData.GetTuple3(0)