-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add interactive tree visualization #348
Comments
Print tree as string is done in #350 |
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 |
Change the implementation of 'get_model_tree' to use the '_GRPC_PROPERTIES' class attribute, and thus include all newly-added object types in the representation. The style of the tree has changed in some ways: - The root node now shows the model name, instead of always 'Model' - Objects (name or id) are distinguished from collections by wrapping the string in single quotes - The additional nesting level for 'Materials', 'Selection Rules', and other 'logical' groupings which are not part of the PyACP hierarchy has been removed [1] [1] This change might be debatable since the ACP GUI does show this nesting level. Since the PyACP hierarchy does not include them, it would be complicated to add them in a generic way, however. To discuss: should the collection names be capitalized (as done currently), or not (matching the PyACP attribute names)? The new tree structure can be seen in the updated test cases. Partially addresses #348, interactive tree support in Jupyter notebooks is still missing.
Change the implementation of 'get_model_tree' to use the '_GRPC_PROPERTIES' class attribute, and thus include all newly-added object types in the representation. The style of the tree has changed in some ways: - The root node now shows the model name, instead of always 'Model' - Objects (name or id) are distinguished from collections by wrapping the string in single quotes - The additional nesting level for 'Materials', 'Selection Rules', and other 'logical' groupings which are not part of the PyACP hierarchy has been removed [1] [1] This change might be debatable since the ACP GUI does show this nesting level. Since the PyACP hierarchy does not include them, it would be complicated to add them in a generic way, however. To discuss: should the collection names be capitalized (as done currently), or not (matching the PyACP attribute names)? The new tree structure can be seen in the updated test cases. Partially addresses #348, interactive tree support in Jupyter notebooks is still missing.
Change the implementation of 'get_model_tree' to use the '_GRPC_PROPERTIES' class attribute, and thus include all newly-added object types in the representation. The style of the tree has changed in some ways: - The root node now shows the model name, instead of always 'Model' - Objects (name or id) are distinguished from collections by wrapping the string in single quotes - The additional nesting level for 'Materials', 'Selection Rules', and other 'logical' groupings which are not part of the PyACP hierarchy has been removed The new tree structure can be seen in the updated test cases, or in `print_model.rst`. Partially addresses #348, interactive tree support in Jupyter notebooks is still missing.
The tree printer has been fixed in #679; moving this to backlog since now only interactive (ipytree) component is missing. |
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)
The text was updated successfully, but these errors were encountered: