From 95abe9fd74c69c6e470a7d01f91c1651ee338a61 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Tue, 7 May 2024 02:19:49 +0100 Subject: [PATCH] added missing arg delLastNumber --- src/geouned/GEOUNED/LoadFile/LoadFunctions.py | 4 ++-- src/geouned/GEOUNED/LoadFile/LoadSTEP.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/geouned/GEOUNED/LoadFile/LoadFunctions.py b/src/geouned/GEOUNED/LoadFile/LoadFunctions.py index 25fe20c9..0626f83f 100644 --- a/src/geouned/GEOUNED/LoadFile/LoadFunctions.py +++ b/src/geouned/GEOUNED/LoadFile/LoadFunctions.py @@ -18,11 +18,11 @@ def get_label(label, delLastNumber): return label -def getCommentTree(obj): +def getCommentTree(obj, delLastNumber): recursive_list = [] c_obj = obj while c_obj.InList: - label = get_label(c_obj.InList[0].Label) + label = get_label(c_obj.InList[0].Label, delLastNumber) recursive_list.append(label) c_obj = c_obj.InList[0] diff --git a/src/geouned/GEOUNED/LoadFile/LoadSTEP.py b/src/geouned/GEOUNED/LoadFile/LoadSTEP.py index 757f9a65..4064f1e2 100644 --- a/src/geouned/GEOUNED/LoadFile/LoadSTEP.py +++ b/src/geouned/GEOUNED/LoadFile/LoadSTEP.py @@ -60,7 +60,7 @@ def load_cad(filename, mat_filename, delLastNumber, default_mat=[], comp_solids= for elem in doc_objects: if elem.TypeId == "Part::Feature": - comment = LF.getCommentTree(elem) + comment = LF.getCommentTree(elem, delLastNumber) if not elem.Shape.Solids: print( "Warning: Element {:} has no associated solid".format( @@ -77,7 +77,7 @@ def load_cad(filename, mat_filename, delLastNumber, default_mat=[], comp_solids= comment = comment + "/" + label if elem.InList: # MIO: lightly modification of label if required - label_in_list = LF.get_label(elem.InList[0].Label) + label_in_list = LF.get_label(elem.InList[0].Label, delLastNumber) encl_label = re.search( "enclosure(?P[0-9]+)_(?P[0-9]+)_", label_in_list ) @@ -107,7 +107,7 @@ def load_cad(filename, mat_filename, delLastNumber, default_mat=[], comp_solids= xelem = [elem] while xelem and not tempre_mat: # MIO: Modification of label if required - temp_label = LF.get_label(xelem[0].Label) + temp_label = LF.get_label(xelem[0].Label, delLastNumber) tempre_mat = re.search("_m(?P\d+)_", "_" + temp_label) xelem = xelem[0].InList @@ -115,7 +115,7 @@ def load_cad(filename, mat_filename, delLastNumber, default_mat=[], comp_solids= xelem = [elem] while xelem and not tempre_dil: # MIO: Modification of label if required - temp_label = LF.get_label(xelem[0].Label) + temp_label = LF.get_label(xelem[0].Label, delLastNumber) tempre_dil = re.search("_d(?P\d*\.\d*)_", temp_label) xelem = xelem[0].InList # Paco end