dchang1
(Dchang)
July 27, 2020, 5:14pm
1
The documentation on this page seems to be incomplete. For example I cannot find the documentation for compute_rhino3d.Grasshopper
or compute_rhino3d.Util
anywhere.
https://compute-rhino3d.readthedocs.io/en/latest/index.html
I would be thankful if someone can point me towards the full version of compute_rhino3d’s documentation!
will
(Will Pearson)
July 28, 2020, 9:48am
2
Unfortunately that’s the documentation that we have right now. While we work on improving it, the library works well with Visual Studio Code’s intellisense.
Here’s a sample to get you started with the Grasshopper functionality…
import compute_rhino3d.Util
import compute_rhino3d.Grasshopper as gh
import rhino3dm
import json
compute_rhino3d.Util.authToken = ADD_TOKEN_HERE
pt1 = rhino3dm.Point3d(0, 0, 0)
circle = rhino3dm.Circle(pt1, 5)
angle = 20
# convert circle to curve and stringify
curve = json.dumps(circle.ToNurbsCurve().Encode())
# create list of input trees
curve_tree = gh.DataTree("RH_IN:curve")
curve_tree.Append([0], [curve])
rotate_tree = gh.DataTree("RH_IN:rotate")
rotate_tree.Append([0], [angle])
trees = [curve_tree, rotate_tree]
This file has been truncated. show original