filipwIf I understand you correctly, you'd like ready nodes/functions to use- This is where one would need to understand your exact constraints to even begin tackling it. Just filling a single polygon with squares is a difficult problem. Would you instead say that you can accept working on a grid then the same challenge become trivial- just move the grid over the polygon and delete what's outside. But then again, say you also need it to work for multiple polygons in 3d and the distribution needs to be continuous across edges and the grid solution becomes very difficult.
As you saw from the first post, I am hoping for a genre “0” ? so I can lazily jump to other issues.
Fundamentally it's about how packing problems is ambiguous and lack good universal methods. UV packing is the best there is.