So I’ve found an old definition by Daniel Piker that helps to flatten double curved quad mesh while maintaining edge lengths. While it works with a single mesh (edge lengths don’t stay exactly the same), it fails when inputing multiple meshes (seems like ‘Smooth’ goal is causing an issue). If I remove ‘Smooth’ goal, the solver works again, however becomes very slow and far from perfect - the mesh doesn’t get flat and edge lengths are not maintained. And if I only leave ‘OnPlane’ goal, meshes get perfectly flat, however their edges towards the corners of the mesh become much shorter than the original ones.
I’ve also tried to use different goals for maintaining edge lengths and play with the strengths of each goal with no success. In attached file you can see original definition by Daniel, and my attempt to adapt it for multiple meshes. Only difference is that I’m using average mesh normal plane to pull the mesh to. Meshes can’t be joined as I need to maintain their order and work with precise mesh topology post-relaxation.
Any ideas what might be wrong or what other approach could be helpful here?
Without ‘EdgeLength’ goal (desired end result in terms of flattening, but the edge lengths are wrong here):
With ‘EdgeLength’ goal (badly flattened + takes MUCH longer to converge):
210914_FlattenMesh-example.gh (209.9 KB)