My first issue is getting a set of planes and a set of points as input, an find the projection of the those points on the nearest plane.
That was pretty easy, where i just calculate the normal of the plan and do some linear algebra to find the best plane to project onto.
Now i do not have just normal planes, i have a set of freeform surfaces, like $\textit{Bspline}$ and $\textit{Nurbs}$ and i have to project my given points on those surfaces. i Struggle to find the minimum distance between the point and the surface.
Any idea how to do that?