import subprocess

# Vamos ajustar os pontos de planSheer para as declividades serem estritamente monótonas decrescentes:
# de x=0 a x=36.2
# Popa x=0: y=2.60 (declive positivo, abrindo em direção à boca máxima)
# Boca máxima em x=15.0 a 16.0: y=3.80 (declive ~0)
# Proa x=36.2: y=0.0 (declive negativo)

# Testando nós para planSheer:
# x=0, y=2.60
# x=7.5, y=3.55
# x=15.5, y=3.80
# x=26.0, y=2.90
# x=36.2, y=0.0

cmd = [
    "python3", "/home/magdalena/.hermes/plugins/iarquiteto-naval-brana/skills/brana-rascunho-2d-interativo/scripts/ajustar.py",
    "--loa-sq", "36.2",
    "--curva", "planSheer", "0,2.60", "7.5,3.55", "15.5,3.80", "26.0,2.85", "36.2,0.0",
    "--curva", "profSheer", "0,6.00", "8.0,5.65", "16.0,5.50", "26.0,6.60", "36.2,9.00",
    "--curva", "profKeel", "0,1.80", "7.0,0.50", "16.0,0.00", "27.0,2.50", "36.2,9.00"
]

res = subprocess.run(cmd, capture_output=True, text=True)
print("STDOUT:\n", res.stdout)
