def read_lines(fpath):
    """ Read coordinates of cutting line segments from a plain text file.
        The expected format is:
        x1 y1 x2 y2
        in each line.

        Parameters
        ----------
        fpath
            Name of a file containing coordinates of cutting lines

        Returns
        --------
        list
            List of coordinates of cutting lines
    """
    with open(fpath, 'r') as f:
        lines = list()
        for line in f:
            line = line.strip()
            if len(line) > 0:
                tokens = line.split()
                lines.append(list(map(float, tokens[:4])))
        return lines