Grasshopper

algorithmic modeling for Rhino

Hi Fellows,

I have a  problem that I cant handle myself .Help me please !

I have a data tree, some branches contain one number and others contain more . Now I want to compare the numbers within every branches and cull part numbers .The rule is :if a number want to stay ,there must be a same number within the same buranch. Under this rule, some branches only contain null item(s) ,and others containt no less than two same numbers.  And then the Branches show  in the first picture below would turn out to be Branches as anyone of the other  pictures shows or something similar.Thank you .

 

Views: 258

Replies to This Discussion

How about introducing an Item at the beginning of every list to be compared to and then remove it at the end?

Hi Danny ,

Thanks for your response .But I think by your method I cant reach the result as Option 3(the last picture shows) .Yes, Now I think the option 3 is where I wanna arrive. Using Shift component would not be logical enough in this case I doubt.
Sorry I misunderstood what you wanted.
hello,

here is at least a partial solution to start you out:

first you check if the path has more than one item, then cull the paths that contain less than one.

next you check if the sum of the paths values, is divisible by the first item, and has a zero remainder.

to work out the case where an one item is different than the others and you want the two that are similar, you can make use of the partial results output on the mass addition component.

i attached a partial solution file, connect your list of values into this solution

good luck
Attachments:
Yes, it works~Thanks~~

And I also find an other way to get the same result ~~Thanks ~

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service