It’s released in 2013, now we can call almost components functions in python script.
http://stevebaer.wordpress.com/2013/12/11/ghpython-node-in-code/
import rhinoscriptsyntax as rs
import Rhino.Geometry as rg
import random
import math
import ghpythonlib.components as ghlcp
objs = []
pts = []
for i in range(20):
x = random.uniform(0,30)
y = random.uniform(0,30)
z = 0
point = rg.Point3d(x,y,z)
pts.append(point)
result = ghlcp.DelaunayEdges(pts)
objs.extend(result[1])
result = ghlcp.Voronoi(pt)
objs.extend(result)
a = objs
Comments are closed.