For some of my personal work, i will like to be able to rotate, some piece along their most suitable candidate edge, and for this using some curve generate by shortest path like here or maybe gradient field.
i guess i will have to simplify the edge also off course to get some kind of median axis. tIm not familiar with eigen, covariant matrice , probably i guess i have to use dot product once i make an approximation of the main edge of every piece and compare the normal or each to the tangent of the closest path or so...
Any TD around which might feel more comfortable here with the maths and don't mind to give a try this puzzle challenge?