Function normaliseLinePattern