Open janvonrickenbach opened 9 months ago
Print tree as string is done in #350 Interactive tree in ipython notebook still todo.
The current model tree printer also needs updating to show the new object types. Maybe we can restructure it to make use of the tree built up for the recursive copy feature[1], to ensure it stays up-to-date.
[1] The order and / or labels of groups may need specific handling
Currently it is hard to get an overview over the model.
We could add a small visualization for the plies with ipytree [1]. We could add some print functionality to get an overview over the layup Maybe add a helper function to export/print the layup as JSON (with configurable detail) Document workflow for opening a pyACP model in ACP standalone (maybe even with some "live" reload functionality)
[1]
from ipytree import Tree, Node model.update()
tree = Tree(stripes=True) tree
for modeling_group_name, modeling_group in model.modeling_groups.items(): group_node = Node(modeling_group_name) tree.add_node(group_node) for modeling_ply_name, modeling_ply in modeling_group.modeling_plies.items(): modeling_ply_node = Node(modeling_ply_name) group_node.add_node(modeling_ply_node) for production_ply_name, production_ply in modeling_ply.production_plies.items(): production_ply_node = Node(production_ply_name) modeling_ply_node.add_node(production_ply_node) for analysis_ply_name, analysis_ply in production_ply.analysis_plies.items(): analysis_ply_node = Node(analysis_ply_name) production_ply_node.add_node(analysis_ply_node)