How to classify unsorted levels name

I want to confirm the level is correct first. Moving the elements by their X and Y distances is step two, but if the levels aren’t correct then you need to identify the cause and resolve that issue first.

If you want to ignore the stated level issue, give this a shot:

  1. Take the bounding box of any one instance.
  2. Get the minimum and maximum point.
  3. Build a vector from the min point to the max point.
  4. Pull the X and Y values of the vector.
  5. Translate the rotated instances by those X and Y values.

Note: if ever you want a non-180 degree rotation you will need to do some trig based on the rotation angles.

I would recommend making sure that ignoring the rotation everything else is correct first though.

1 Like