Rebuilds a blocked path from the output to input points.
        
        :return     <QPainterPath>

def rebuildBlock(self):
        """
        Rebuilds a blocked path from the output to input points.
        
        :return     <QPainterPath>
        """
        # collect the control points
        points = self.controlPoints()

        curve = 12

        path = QPainterPath()
        if len(points) == 2:
            path.moveTo(*points[0])
            path.lineTo(*points[1])
        else:
            for i in range(len(points) - 2):
                a = points[i]
                b = points[i + 1]
                c = points[i + 2]

                delta_ab_x = b[0] - a[0]
                delta_ab_y = b[1] - a[1]

                delta_bc_x = b[0] - c[0]
                delta_bc_y = b[1] - c[1]

                # calculate ctrl_ab
                if delta_ab_y == 0:
                    mult = delta_ab_x / max(abs(delta_ab_x), 1)
                    off_x = min(curve, abs(delta_ab_x * 0.5))
                    ctrl_ab = (b[0] - (off_x * mult), b[1])
                else:
                    mult = delta_ab_y / max(abs(delta_ab_y), 1)
                    off_y = min(curve, abs(delta_ab_y * 0.5))
                    ctrl_ab = (b[0], b[1] - (off_y * mult))

                # calculate ctrl_bc
                if delta_bc_y == 0:
                    mult = delta_bc_x / max(abs(delta_bc_x), 1)
                    off_x = min(curve, abs(delta_bc_x * 0.5))
                    ctrl_bc = (b[0] - (off_x * mult), b[1])
                else:
                    mult = delta_bc_y / max(abs(delta_bc_y), 1)
                    off_y = min(curve, abs(delta_bc_y * 0.5))
                    ctrl_bc = (b[0], b[1] - (off_y * mult))

                if not i:
                    path.moveTo(*a)

                path.lineTo(*ctrl_ab)
                path.quadTo(*(list(b) + list(ctrl_bc)))

            path.lineTo(*points[-1])

        return path