[edit: This solution is wrong, as one of my lines has only 3 magnets in it]
Here's a picture of one way to do it.
[![10 lines of 4][1]][1] [1]: https://i.sstatic.net/O1CYz.png
Draw the lines around and through the centre trapezoid first, then horizontal top and bottom lines, and then the sloping left and right lines. Each time you draw a line there are no more than 2 points already fixed that the line has to go through, so they can all be straight lines.
(I don't know how to spoiler an image, sorry)
Draw the lines around and through the centre trapezoid first, then horizontal top and bottom lines, and then the sloping left and right lines. Each time you draw a line there are no more than 2 points already fixed that the line has to go through, so they can all be straight lines.