algorithmic modeling for Rhino
I was trying out calling GH components in Python, following a post by by Steve Baer, that explains how to apply parallel computing and call components in Python in GH.
However I ran into a number of issues:
Has anyone tried this before? Or know what might be the problem?
Attached are the files for your reference.
Regards,
Omar
Tags:
Hi Omar
the script had a logic bug, in the sense that it was supposed to work on the entire list of curves, not only one at the time. I set list access to fix this.
I also made a quick test at making this parallel. It works here as well. Making it parallel in more advanced ways, for example by making both inputs accept lists, will be more complicated. However, this shows the potential.
Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com
Just by quick look at the photo you attached:
Your input is "curveA", while in your code you have "curvesA".
Yeah, sorry I renamed it just as a last step and forgot to update the code...
I fixed this, but now the parallel python does work in the proper way
In fact, forget that parallel sample entirely. That operation is not parellelizable. I put that together in haste and did not check that it did not make sense for what you were trying to do. The serial sample should work correctly.
Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com
Thanks Giulio,
Actually now that you have mentioned it, yes, I think I kind of understand how in this case it is not parellizable...
So my next target would be the "Cap Brep" component, it takes a long time on my definition and it should be "parellizable", as it is basically trying to cap a large number of separate open breps.
Thanks again Giulio and Djordje
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by