View Full Version : Intersecting a straight line and a face.

02 February 2011, 04:38 PM
Hey guys,

I have been trying to figure out if it is possible, or if anyone has already written a script that can determine the intersection point between a straight line (2 points) and a face, either marking the point somewhere along the line, or on the face itself.

I have seen the Koshigaya intersecting poly script, and I have also checked out the built in intersecting tests within the API already in Maya, but to my knowledge those only test for line intersection.

Anyone have any ideas where to start poking around, or even what terminology to use? I have been going with the google search of "mel, script, intersect, line, face, geometry" or something like that, but if there is a specific term for what I am looking for, that would be awesome as well.


02 February 2011, 05:12 PM
do a search right here for rayIntersect

a line of two points is just the same as two rays. you have to check from one point down the line, then the other point up the line. if BOTH produce an intersection then the line intersects.


02 February 2011, 05:40 PM
Awesome I will check it out. Thanks for the terminology clarification

CGTalk Moderation
02 February 2011, 05:40 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.