I have been using Rhino UserString (GetUserString SetUserString) quite a lot and find it super useful. Very often I store additional geometry such as Mesh by serializing mesh.ToJSON()
How does it work with Breps? Can I serialize and deserialize BREP to JSON and store it as a user string? Or I should use UserDictionary to store the object.
The reason to ask this question, is that in Rhinocommon I see Mesh.toJSON() method but there is no BRep.toJSON() method.
Is it possible to check the json string whether it is a mesh of brep?
I serialized mesh.toJSON and brep.toJSON, and stored them in one list.
Now I would like to deserialize them. But you need to call Brep.fromJSON and Mesh.FromJSON explicitly.