After further investigation, nvm i'm dumb

felet låg i RectangleShape.calcLines()