There's an open source project I started a while back that may be a good starting point or a good reference for implementation.https://github.com/ajisaacs/OpenNest.git

There isn't much right now...