Question: I'm looking for a Script or Add-on for Blender 2.79 that creates verts and a lines where two objects intersect.

Practical example:
------------------

I need loops where the mountains intersect with the grass and where the grass intersects with the water for many purposes:

* Hitboxes around everything preventing player from leaving level (Extrude loops upward)
* AI boundaries where Ranged AI should not walk (Water)
* AI boundaries where Melee AI should not walk into / see player
* Boundaries for generating Vegetation using the Particle System

Image below is a part of the scene.

Some people recommended boolean and knife tools. It doesn't work out of the box, but I figured out a way and put it in a seperate answer below.

[![enter image description here](https://i.stack.imgur.com/NxWq5.jpg)](https://i.stack.imgur.com/NxWq5.jpg)

Answer: 
Script of Witold Jaworski generates intersection of two selected meshes.

* Select two objects
* Press `W` (in 2.79), for 2.8x search *Intersection*
* Press `P` (Separate) > *Selected*

[![enter image description here](https://i.stack.imgur.com/a7yZJ.png)](https://i.stack.imgur.com/a7yZJ.png)
[![enter image description here](https://i.stack.imgur.com/3WAjZ.png)](https://i.stack.imgur.com/3WAjZ.png)
[![enter image description here](https://i.stack.imgur.com/e45Cl.png)](https://i.stack.imgur.com/e45Cl.png)

* [Version for 2.79](http://airplanes3d.net/downloads/scripts/25/object-intersection.zip)
* [Version for 2.8x](http://airplanes3d.net/downloads/scripts/28/object-intersection.zip)

For more detailed instructions [visit his site](http://airplanes3d.net/scripts-253_e.xml). 

For future broken links – blend with script for version 2.79

[![](https://blend-exchange.giantcowfilms.com/embedImage.png?bid=1y2P5jV4)](https://blend-exchange.giantcowfilms.com/b/1y2P5jV4/)

For complex mesh like terrain is better select roughly vertices in intersected area to get script calcutlat faster, and I did quick cleaning of result (not perfect):

* in Edit mode select one of the longer edge than ussual
* search *Similar* > *Lenght* > *Greater*, Delete `X`
* than Select all and Search *Remove Doubles* (in 2.8x *Merge by Distance)*

(In tool properties you can increase minimum distance limit, it depence on how precise final intersection has to be. Higher value clean it better but in cost of preciseness (detail). Three gaps I had to connect manually. Pink line is the intersection object, converted into curve just to be visible in the image better.)

[![enter image description here](https://i.stack.imgur.com/AuWQ7.gif)](https://i.stack.imgur.com/AuWQ7.gif)

[![](https://blend-exchange.giantcowfilms.com/embedImage.png?bid=KRBPvD8j)](https://blend-exchange.giantcowfilms.com/b/KRBPvD8j/)
Just a reminder of **Bisect tool** in Blender 2.8x (as native tool) that can do similar kind of job (cut by plane). 

* Duplicate your object
* Search Bisect
* Enable **Clear Inner** and **Clear Outer** in tool properties in left-down corner
* Adjust cut position (can be set numerically in properties too)

Done

[![enter image description here](https://i.stack.imgur.com/XOyEZ.jpg)](https://i.stack.imgur.com/XOyEZ.jpg)
For horizontal cut set Plane Normal values to 0/0/1 and move only Z axis of Plane Point parametr.

[![enter image description here](https://i.stack.imgur.com/qzeUi.jpg)](https://i.stack.imgur.com/qzeUi.jpg)

[![enter image description here](https://i.stack.imgur.com/9gS0h.gif)](https://i.stack.imgur.com/9gS0h.gif)