compas
compas copied to clipboard
TreeNode data dict
for the tree node there are two options
- keep the attributes dict in the data dict and convert the node explicitly to/from data
- don't include the attributes dict in the data dict and let the encoder/decoder handle to/from (then the attributes are included implicitly)
the file size of 1. is much smaller and is similar to what happens to nodes in a graph and vertices in a mesh. however, there the behaviour is not so explicit since the nodes and vertices are not separate objects.
if a tree node is not meant to exist on its own (like graph nodes and mesh vertices), perhaps we should make sure that they cannot be converted to/from data independently?
Originally posted by @tomvanmele in https://github.com/compas-dev/compas/pull/1247#discussion_r1442609012