ASP refactoring, sequence generation via clusterization
This commit is contained in:
parent
d2ab856d64
commit
fd59ab9e26
45 changed files with 1579 additions and 1267 deletions
28
geometric_feasibility_predicate/models/error_string_model.py
Normal file
28
geometric_feasibility_predicate/models/error_string_model.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
import json
|
||||
from repository.file_system_repository import FileSystemRepository
|
||||
from usecases.exit_freecad_use_case import (
|
||||
ExitFreeCadUseCase,
|
||||
)
|
||||
|
||||
|
||||
class ErrorStringModel:
|
||||
def __init__(self, error: str) -> None:
|
||||
self.error = error
|
||||
pass
|
||||
|
||||
error: str
|
||||
|
||||
def toString(self) -> str:
|
||||
return json.dumps(
|
||||
{
|
||||
"error": self.error,
|
||||
},
|
||||
ensure_ascii=False,
|
||||
indent=4,
|
||||
)
|
||||
|
||||
def toFileSystem(self, path: str):
|
||||
return (
|
||||
FileSystemRepository.writeFile(self.toString(), path, "error.json"),
|
||||
ExitFreeCadUseCase.call(),
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue