FEM: utils and run, get rid of circle import

This commit is contained in:
Bernd Hahnebach
2019-09-10 07:45:58 +02:00
parent 10b0bb032b
commit 620e6af26e
2 changed files with 10 additions and 10 deletions

View File

@@ -457,11 +457,4 @@ class _DocObserver(object):
return False
class MustSaveError(Exception):
pass
class DirectoryDoesNotExistError(Exception):
pass
## @}

View File

@@ -31,7 +31,6 @@ import os
import sys
import FreeCAD
from femsolver import run
from femsolver import settings
from femsolver.run import _getUniquePath as getUniquePath
if FreeCAD.GuiUp:
@@ -197,7 +196,7 @@ def get_beside_base(obj):
"Can't start Solver or Mesh creation besides FC file.",
error_message
)
# raise run.MustSaveError()
# raise MustSaveError()
return get_temp_dir()
else:
return os.path.splitext(fcstdPath)[0]
@@ -214,7 +213,7 @@ def get_custom_base(solver):
"Can't start Solver or Mesh creation.",
error_message
)
raise run.DirectoryDoesNotExistError("Invalid path")
raise DirectoryDoesNotExistError("Invalid path")
return path
@@ -228,6 +227,14 @@ def check_working_dir(wdir):
return False
class MustSaveError(Exception):
pass
class DirectoryDoesNotExistError(Exception):
pass
# ************************************************************************************************
# other
def get_part_to_mesh(mesh_obj):