[quote user="Xavi García Maranges"]I have written my own algorithm apllying equation of a line projecting the point to a perpendicular distance to the line [/quote]
Before you rush into your own algorithm design, look carefully at the API. VBA provides the Ray3d and Segment3d UDTs1, and a number of methods that work with those...
- Ray3dClosestPoint...
- Ray3dFrom...
- Ray3dRay3dClosest...
- Ray3dRay3dIntersectXY
- Segment3dClosestPoint...
- Segment3dFrom...
- Segment3dSegment3dClosest...