def p_seg(p1, p2, cw, interval, trim=0, align=0):
    """ parallel segment
    Args:
      p1, p2: point(x, y)
      cw: m_seg rad True: -π/2, False: π/2
      interval: m_seg dist
      trim: t_seg trim
      align: t_seg align
    """
    case = {True: pi / -2, False: pi / 2}
    p1m, p2m = m_seg(p1, p2, case[cw], interval)
    return t_seg(p1m, p2m, trim, align)