FreeCAD: data base names

This commit is contained in:
brothermechanic 2024-04-09 18:08:09 +03:00
parent 3878990c4e
commit 0ecf214e26
No known key found for this signature in database
GPG key ID: 9C59EF9503ACD106
2 changed files with 14 additions and 14 deletions

View file

@ -260,7 +260,6 @@ def hierarchy_tree(obj, dict_tree, clones_dic=None) -> dict:
]
}
'''
# collect type
if obj.isDerivedFrom('Part::Feature'):
if obj.isDerivedFrom('PartDesign::CoordinateSystem'):
@ -274,9 +273,10 @@ def hierarchy_tree(obj, dict_tree, clones_dic=None) -> dict:
# collect name
dict_tree['name'] = obj.Label
# collect base_name
dict_tree['base_name'] = ''
if clones_dic:
if obj.isDerivedFrom('Part::Feature'):
if obj.isDerivedFrom('Part::Feature') and (
not obj.isDerivedFrom('PartDesign::CoordinateSystem')):
dict_tree['base_name'] = obj.Label
for k, v in clones_dic.items():
if obj.Label in v:
dict_tree['base_name'] = k