Open DharmanGersch opened 2 years ago
https://discourse.mcneel.com/t/json-deserialization-in-rhinocommon/91984/5 After some poking around, it looks like there is an answer located here :point_up: .... but I am not sure if @andrewheumann has implemented this or not, or if there are limitations to this approach?
It's really nice that jSwan casts to json, and it's so easy 🥇 I even often find myself telling other people how good it is, and that you can even serialize grasshopper geometry! 👏
And then i realize that i have to deserialize the geometry again at some point and it's not quite as convenient. In fact it's a little overwhelming 😧 And the binary geometry data is mysteriously inaccessible... 🔒
My dream is for DeJson to work like this or even to directly return the geometry, but this would probably disrupt other uses.
Have you considered allowing the binary archive to cast to geometry? and the GH parameters to cast to their types? Even just simple types like points, vectors planes and polylines would be really convenient. Is this even possible? Because jswan is passing text around would this not be possible? the GeometryGym Revit add-in casts custom classes to breps with the native brep param.
If you think this is worthwhile or a possible direction i'd love to contribute and put in a PR 🤝