Слияние веток 91 и path2pddl

This commit is contained in:
Mark Voltov 2024-03-24 15:26:20 +03:00
parent 44ee21414b
commit e86914dba1
24 changed files with 732 additions and 0 deletions

View file

@ -0,0 +1,18 @@
from helpers.either import Either, Left, Right
from repository.freecad_repository import (
FreeCadRepository,
)
class OpenFreeCadDocumentUseCase:
"""A class that checks open documents, closes them and opens the one with which the program will work"""
def call(path: str) -> Either:
try:
FreeCadRepository().closeIfOpenDocument()
FreeCadRepository().openDocument(path)
return Left(None)
except Exception as e:
print(e)
print("OpenFreeCadDocumentUseCase error")
return Right(None)