Dear Marco,
I am glad you like my little post! As usual you are trying the most challenging task! Somewhat inspired by this picture
img1 = Binarize@ColorNegate[Graphics[{EdgeForm[White], Black, jigsawPolygsRaw}, ImageSize -> Large]];
DistanceTransform[img1] // ImageAdjust

I was thinking about it but could not come up with a better idea than the most obvious: Making a binary function out of each piece (defined by its polygon)
polygToFunction[p_Polygon] := Module[{meanShift, region},
meanShift = Mean @@ p;
region = DiscretizeGraphics@Graphics[Map[# - meanShift &, p, {2}]];
Return[Function[{pt}, Piecewise[{{1, pt \[Element] region}}]]]
]
adding them all up with specific translations, minimizing its integral ... Well, definitely not a good idea! It is probably a NP problem, one probably needs an heuristic algorithm (simulated annealing, genetic algorithm, ...). I am very curious about your solution!
Best regards -- Henrik