Creating a enhanced Knife-Tool

Hi there.
I am creating a building-generator and encountered this problem:
I want to cut the layout of a roof with a mesh containing the lines of crest, gutter & co.
To do so, I wanted to use the Knife-Tool. But you cant give the Knife-tool a list of Vertices and edges to cut along them.

Now I would like to have:

def new_Knive(Vertices, Edges, object_to_be_cut, projection_vector=(0,0,1), cut_trough=False, use_occlude_geometry=True, only_selected=False):
do sth.

or alternative to Verts and edges use a object to cut(but I’d like the first one better).

thanks in advance,

The script would be open source.

It would already help me if someone could place the sourcecode of the original knife-tool here. (I just cant find it).

Moved from “Jobs > Volunteer Work” to “Coding > Python Support”