Hi there!
I am part of the ShapeDiver team and we are currently working on a TypeScript SDK for our Structured Data Transfer Format (sdTF). It’s basically an API-neutral exchange and storage format for trees of data items as used by parametric 3D modeling software like Grasshopper and works neatly with our Grasshopper output components.
And, for obvious reasons, we would like to integrate the rhino3dm-library as well. However, we encountered the following problems in the rhino3dm.d.ts TypeScript declaration file (version 7.14.0), which prevents us from actually typing Rhino components:
-
BasepointZero
should beBasePointZero
(line 1648) -
byte
is not declared (lines 1953 and 1957). -
double
is not declared (line 4835).
Here is a small example to recreate these issues:
// script.ts
import { RhinoModule, Sphere } from "rhino3dm"
const rhino3dm = require('rhino3dm')
rhino3dm().then((rhino: RhinoModule) => {
const sphere: Sphere = new rhino.Sphere([1,2,3,], 12)
console.log(sphere.radius)
})
It would be great if you could fix these issues.
Many thanks!