Skip to content

Commit 681a0f1

Browse files
committed
return also compnent dictionary
1 parent 1013eb3 commit 681a0f1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/geometry_api/geometry_api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,7 @@ def visit(el, parent_component=None, level=0):
562562
parent=parent_component,
563563
)
564564
_components[this_component.name] = this_component
565+
#print (this_component.name, this_component.typeID, this_component.translation, this_component.rotation)
565566
parent_component = this_component
566567
#else:
567568
# print(f"{indent} ✗ skipping (no typeID or Component def)")
@@ -581,4 +582,6 @@ def visit(el, parent_component=None, level=0):
581582

582583
# Return the highest (first) component as the likely root
583584
roots = [c for c in _components.values() if c.parent is None]
584-
return roots[0] if roots else None
585+
if roots:
586+
roots = roots[0]
587+
return roots, _components

0 commit comments

Comments
 (0)