Rhino.Compute with Three.js: geometry types

Hi all,
I am fairly new to Rhino.Compute and have followed the examples posted on the Rhino website and most of them, use meshes as an example

Is there documentation on how to pass other geometry types, such as Breps, curves, lines etc to Three via compute? or perhaps a sample file?

Many thanks for your help

Miguel

Check out the 3DMLoader code for three.js for examples of how we’re covering 3dm to three.js types.

Specifically here: https://github.com/mrdoob/three.js/blob/dev/examples/jsm/loaders/3DMLoader.js#L1036

The rview project has similar conversions.

Mind you both of these projects are converting from objects in a 3dm file. When receiving from compute, you should call
rhino.CommonObject.decode(data); after parsing the returned json, and then deal with the geometry.

1 Like

Hola Luis,
Great to see you again around these pastures!
Thank you for the quick response. This is exactly what I was looking for
I’ll give it a go and will be in touch
Cheers!

Miguel

1 Like