Skip to content

Commit

Permalink
FEM: fix in inp reader, include relative path
Browse files Browse the repository at this point in the history
  • Loading branch information
fandaL authored and berndhahnebach committed Oct 5, 2016
1 parent 024fe26 commit 0ea42e8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Mod/Fem/importInpMesh.py
Expand Up @@ -77,7 +77,13 @@ class elements():
if line[:8].upper() == "*INCLUDE":
start = 1 + line.index("=")
include = line[start:].strip().strip('"')
f_include = pyopen(include, "r")
include_path = os.path.normpath(include)
if os.path.isfile(include_path) is True:
f_include = pyopen(include_path, "r")
else:
path_start = os.path.split(file_name)[0]
include_full_path = os.path.join(path_start, include_path)
f_include = pyopen(include_full_path, "r")
continue
read_node = False
elm_category = []
Expand Down

0 comments on commit 0ea42e8

Please sign in to comment.