One aspect that has not yet been addressed in FuTul is to align different revisions of the same file with entity positions. For example, if a blueprint v2 gets a few extra belts on either top or left side, the whole blueprint would effectively shift right or down, so there is a need to match v1 and v2 revisions, and keep the position: {x, y} values the same between them, while adjusting the top level offset_x & y values.
One solution would be to
~execute git show HEAD:./path/to/file for each blueprint to get the previous version~
Read previous version of the file
create a histogram on all x and y, counting the number of entities at each position
create a list of deltas between old and new histogram counts old_hist[i] - new_hist[i], where i is every histogram group, and compute the min/max/avg, or just stddev
create the same list of deltas by first shifting new_hist so that [i+shift] would be compared with [i], etc, and find the shift with the smallest stddev. Treat that shift as the most optimal one for the whole blueprint
One aspect that has not yet been addressed in FuTul is to align different revisions of the same file with entity positions. For example, if a blueprint v2 gets a few extra belts on either top or left side, the whole blueprint would effectively shift right or down, so there is a need to match v1 and v2 revisions, and keep the
position: {x, y}
values the same between them, while adjusting the top leveloffset_x & y
values.One solution would be to
git show HEAD:./path/to/file
for each blueprint to get the previous version~old_hist[i] - new_hist[i]
, wherei
is every histogram group, and compute the min/max/avg, or just stddev