I would like to take a json representation of a GeometryBase that has been ToJson’d using RhinoCommon.CommonObject.ToJson(...) and deserialize it in Rhino3dm (I am using 8.4.0).
I’m a bit confused, the docs do show a GeometryBase and CommonObject type. And I even see a DracoCompression type. But their decode methods seem to only run on a static object and do not take or return any values.
My assumption is that I don’t understand something about typescript or javascript, and the reason I assume that, is two-fold;
I am new
this snippet here:
In this sample we see createFromThreejsJSON() called with some args, yet in the docs, and when I try to use it I cannot pass these args. The docs state Mesh.createFromThreejsJSON is similar to the above two methods in that it is static, and does not take any args or return anything. https://mcneel.github.io/rhino3dm/javascript/api/Mesh.html#.createFromThreejsJSON
@csykes The docs for js and py rhino3dm are in need of an overhaul as the way they are generated is based on the dotnet SDK, and there isn’t always parity between what is offered in each language. One bit that I have done some work on are the typescript definitions, but again, this includes some manual work and is a pain to maintain. Looking at them now, it seems the specific threejs calls are missing their arguments, which I definitely have filled in before. In short, we need to put in some time to get accurate, maintainable documentation across rhino3dm languages.
That’s smashing thank you! I’ve got some other issues at the moment which are issues seemingly with webpack, When I get those solved I’ll have another crack at it referencing the links you sent