How to connect curves with flat surfaces automatically?

@Box has a fantastic demo of the Curviloft plugin by Fredo6.