Rhino3dm.js and vectors

Hi,

trying to use rhino3dm from javascript (or, precisely, TypeScript). First thing I wanted to do was cross some vectors, but failed to find any vector operations in the API. Are these simply not there yet, or is there a reason? Or did I somehow miss how it works? Using compute for this kind of things seems a bit overkill.

Thanks

Hanno

Hello - are you asking about RhinoCommon?
https://developer.rhino3d.com/api/RhinoCommon/html/Methods_T_Rhino_Geometry_Vector3d.htm#!

-Pascal

You’re not missing anything. I still haven’t figured out a good way to implement very basic data types in rhino3dm like vectors beyond making them into an object or array of three numbers. I know it sounds crazy, but this has been a complicated part of working with web assemblies that I don’t have a good answer for yet.

Thanks for the quick (and honest :slight_smile: reply, Steve. No worries - it’s clearly wip, and I can imagine the hardest problems when porting are in the basics where you are closest to the platform/language.

I got a bigger geometry-related Typescript project here and, knowing RhinoCommon inside-out, thought rhino3dm would be a perfect match. Still convinced that it will be at some point, but not yet…

Really appreciate the work you guys are doing towards other platforms and general web context with Rhino!

2 Likes