Using Python Scripting with Freestyle for Continuous Lines

So, I’ve noticed that Freestyle creates line breaks in the strangest locations, so I’m wondering if creating a script to correct the problem is viable or even possible. (I’ve also noticed edges that intersect on the view-plane also cause a line-break. Solving that would be great too.)

In its basic form, the script should be able to tell Freestyle, if the connected edges have an angle less than or equal to 90 degrees, break the line, if not, don’t.

I’m pitiful at writing Python, so I’d really appreciate the help.