"""
Dieses Skript war zu Beginn vorgegeben
"""


from Classes import Verschneidung, Werkzeug
import json


SETTINGS_PATH = './settings.json'
SETTINGS_TOOL = './exampleConfigFiles/tool.json'
SETTINGS_MACHINE = './exampleConfigFiles/machine.json'
SETTINGS_GEOMETRY = './exampleConfigFiles/geometry_setup.json'
SETTING_PROCESSING = './exampleConfigFiles/processing_setup.json'


def main():
    with open(SETTINGS_PATH, 'r') as f:
        settings = json.load(f)

    with open(SETTINGS_TOOL, 'r') as f:
        tool = json.load(f)

    with open(SETTINGS_MACHINE, 'r') as f:
        machine = json.load(f)

    with open(SETTINGS_GEOMETRY, 'r') as f:
        geometry = json.load(f)    

    with open(SETTING_PROCESSING, 'r') as f:
        processing = json.load(f)   

    verschneidung = Verschneidung.Verschneidung(tool, machine, geometry, processing)
    print(verschneidung)

    # verschneidung.plot_verschneidung()
    # verschneidung.plot_kantenwinkel()
    verschneidung.output_data()
    verschneidung.output_g_code()


# Press the green button in the gutter to run the script.
if __name__ == '__main__':
    main()


