andrewheumann/jSwan

Geometry round trip not possibly

Opened this issue ยท 1 comments

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! ๐Ÿ‘
image

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 ๐Ÿ˜ง
image
And the binary geometry data is mysteriously inaccessible... ๐Ÿ”’

My dream is for DeJson to work like this
image
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.

image

If you think this is worthwhile or a possible direction i'd love to contribute and put in a PR ๐Ÿค

https://discourse.mcneel.com/t/json-deserialization-in-rhinocommon/91984/5
After some poking around, it looks like there is an answer located here โ˜๏ธ .... but I am not sure if @andrewheumann has implemented this or not, or if there are limitations to this approach?