compas icon indicating copy to clipboard operation
compas copied to clipboard

TreeNode data dict

Open Licini opened this issue 6 months ago • 0 comments

          for the tree node there are two options
  1. keep the attributes dict in the data dict and convert the node explicitly to/from data
  2. 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

Licini avatar Jan 05 '24 09:01 Licini