algorithmic modeling for Rhino
For Python's unique node in code feature, so many components now have little banners at the bottom that allow right-click options to be set. For instance, CullDuplicates (CullPt):
CullDuplicates works in Python:
...and if I print ghc.CullDuplicates(curve_points) I see the actual names of the outputs in the Python editor:
...so I can either do:
a,b,c = ghc.CullDuplicates(curve_points)
...or:
a = ghc.CullDuplicates(curve_points)[0]
b = ghc.CullDuplicates(curve_points)[1]
c = ghc.CullDuplicates(curve_points)[2]
...or even:
a = ghc.CullDuplicates(curve_points).points
b = ghc.CullDuplicates(curve_points).indices
c = ghc.CullDuplicates(curve_points).valence
And multiple inputs are just separated by commas within the parenthesis.
But the component is defaulting to Average instead of Leave One, which doesn't give me much useful. I'm trying to remove duplicate lines quickly, of 25K lines, and this is the fastest component in Grasshopper I've found to do that, by finding the line midpoint then getting the indices output from CullDuplicates to find out which are keepers.
There's no documentation about what Average even means, and it spits out a bunch of -1s, with the resulting lines culled by index of the good numbers being rather odd compared to Leave One, which just works naturally, like a human being would want it to.
Is it possible to change the component mode from Average to Leave One from Python?
Rhinocommon seems to lack a cull duplicate lines/curves command, so I'm hoping Grasshopper components will be faster than raw interpreted (uncompiled) Python.
Tags:
Hi Nik, hi Djordje
sorry, this won't make it in time for the GH1 release. Grasshopper 1 does not support changing states programmatically. We are aware of this, and I had duly reported it. GH2 will be designed better regarding this.
Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com
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
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by