Skip to content

Instantly share code, notes, and snippets.



Created Dec 13, 2013
What would you like to do?
packing arguments as tuples and then unpacking them in the parallel function
import ghpythonlib.components as ghcomp
import ghpythonlib.parallel
#custom function that is executed by
def slice_at_angle(args):
brep, plane = args #unpack input
result = ghcomp.BrepXPlane(brep, plane)
if result: return result.curves
if parallel:
items = [(brep, plane) for plane in planes]
slices =, items, True)
slices = ghcomp.BrepXPlane(brep, planes).curves
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment