Teaser 3134: Stringing along [revised]

From The Sunday Times, 16th October 2022 [link] [link]

An artist hammered thin nails from a pack of 40 into a board to form the perimeter of a rectangle with a 1 cm gap between adjacent nails. He created a work of art by stringing a long piece of wire from one nail to another, such that no section of wire was parallel to an edge of the rectangle. The wire started and ended at two different nails, no nail was used more than once and the length of the wire was a whole number of cm. No longer wire was possible that satisfied the above conditions.

What were the dimensions of the rectangle and the length of the wire chain (in cm)?

This is a revised version of the puzzle posted as Teaser 3134. The underlined text has been changed from the previously published version on The Sunday Times website.

This is the version of the puzzle that appeared in the printed newspaper.

[teaser3134]