There are two methods in
distance_point_to_plane returns the distance from the plane. The plane is defined by a point on the plane and its normal.
intersect_point_tri takes 4 arguments, the point and the three points that define the triangle. If outside the triangle it returns None.
from mathutils import Vector
from mathutils.geometry import (
# define a plane by three points
# z=0 xy plane for simplicity
pt1 = Vector((0, 0, 0))
pt2 = Vector((1, 1, 0))
pt3 = Vector((1, -1, 0))
# define the plane
plane_co = pt1
plane_no = (pt3 - pt1).cross(pt2 - pt1).normalized()
pt = Vector((.4, .4, .4))
# find distance to plane
d = distance_point_to_plane(pt, plane_co, plane_no)
print("move", pt, d, "units to", pt + d * plane_no)
p = intersect_point_tri(pt, pt1, pt2, pt3)
print("point on triangle", p)
print("point outside triangle")
Not sure if you were after a scripting answer.