Слияние веток 91 и path2pddl
This commit is contained in:
parent
44ee21414b
commit
e86914dba1
24 changed files with 732 additions and 0 deletions
|
@ -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)
|
Loading…
Add table
Add a link
Reference in a new issue