示例#1
0
    asy_commands = commands.split('\n')
    with open("test.asy", "w") as asyFile:

        for command in asy_commands:
            asyFile.write(command + '\n')

    run_asy_file("test.asy", fmt="png")


winding = Winding("primary")

section = Section(
    "sect1",
    6,
)

section.create_asy_commands()

with open("out.asy", "w") as outFile:
    outFile.write('settings.outformat = "pdf";\n')
    outFile.write('unitsize(1cm);\n')

    for cmd in section.asy_commands:
        outFile.write(cmd + '\n')

#diagram()

with open("build.yml", "r") as yamlFile:

    build = load(yamlFile, Loader=Loader)