here you find the code to calcualte the point where a line intersects a plane
and her you find the code for a boundary-line to grid converter
here you can learn why geoscience is important :-)
some pictures