Here is what I would do if no better idea :
- Calcule distance between user point and a each line shapes created from each couple of vertex (0-1, 1-2, 2-3...) of the given shape
- minimal distance found return memorized start and end vertices of the segment to cut,
-
calculate XY of the new vertex on this segment using either start or end XY and distance, according to the fact that minimal distance is the perpendicular height of a Pythagore triangle.