Hallo, I searched for Intersect (in Blender 2.54 MathUtils) , not found?
Intersect finds (or not!) an intersection point of a ray (point and direction) in a plane defined by three vertices
After some symbolic computations I found out that cross and dot products do the job!
You can get two *.blend from http://www.blendpolis.de/viewtopic.php?f=16&t=30665&p=356234#p356234
My version for 2.54 (with debug prints, should later be removed) and the prepared test for 2.49
If not, I would suggest to supplement mathutils with something like my version
(extra eps parameter for numerical problems, what should be considered zero [absolute value]?!)
geometry.Intersect(v1, v2, v3, ray, orig, clip=1)
New one for me, didn’t even know there was a geometry module – guess it doesn’t help it doesn’t show up in the api docs…
It is there!
>>> dir (geometry)
[‘BarycentricTransform’, ‘BezierInterp’, ‘BoxPack2D’, ‘ClosestPointOnLine’, ‘Intersect’, ‘LineIntersect’, ‘LineIntersect2D’, ‘PointInQuad2D’, ‘PointInTriangle2D’, ‘PolyFill’, ‘QuadNormal’, ‘TriangleArea’, ‘TriangleNormal’, ‘doc’, ‘name’, ‘package’]
( all my work nearly for nothing, but discovered that the result is can be done by dot en cross-product, which I did not know before)!
(OK, only difference, I think, I included a last parameter eps = 0.000001, for numerical zero)