#! /usr/bin/python3
# Test program for module {seam_example}.
# Last edited on 2021-03-16 21:05:11 by jstolfi

import seam_example
import block
import path
import move
import move_parms
import contact
import seam
import hacks
import job_parms
import color
import rn
import pyx
import sys
from math import sqrt, sin, cos, floor, ceil, inf, nan, pi

parms = job_parms.typical()

mp_jump = move_parms.make_for_jumps(parms)
mp_cont = move_parms.make_for_contours(parms)
mp_fill = move_parms.make_for_fillings(parms)

wdf = move_parms.width(mp_fill)
wdc = move_parms.width(mp_cont)

def plot(tag, SMS, BCS, deco):
  fname = "tests/out/seam_example_TST_" + tag
  wd_axes = 0.05*wdf
  CLRS = hacks.trace_colors(len(BCS))
  clr_ct = pyx.color.rgb(1.000, 0.000, 0.300)
  seam.plot_to_files(fname, SMS, clr_ct, BCS, CLRS, wd_axes, matter=True)
  return
  # ----------------------------------------------------------------------

def test_misc_A():
  sys.stderr.write("--- testing {misc_A} ---\n")
  tag = "misc_A"
  SMS, BCS = seam_example.misc_A(mp_fill)
  plot(tag, SMS, BCS, True)
  return
  # ----------------------------------------------------------------------

test_misc_A()
