Grasshopper

algorithmic modeling for Rhino

Hi everyone,

I have a culling problem I hope someone can help me solve.

I have tried using both Grasshopper  component as well as Python script, but the same problem persists.

I have a set a numbers that I hope to Cull out from a list of Distances of Closest Points (so that each point will ignore what belongs to its own body). As you see below, the points are 0.0 ~ 327.76884. I use a simple Python script which should do the job, but as output of a = Dist, the numbers starting with 163 and 189 appear un-erased.

I had wondered if it would be a matter tree structure, but trying flattening and grafting didn't change anything.

If someone has any ideas, please help me out, thank you!!

Views: 446

Attachments:

Replies to This Discussion

Something like that?

Your problem would be clearer with an attach gh tbh.

Hi Vongsawat,

Thank you for your response and sorry for being unclear, I have revised my question and uploaded the file. It's that I needed to compare the Set of numbers against a larger list of Distances which include the same numbers as well as other numbers, then remove the points with those distances. Some, such as the 0.0, was removed, but others such as the 163 remain...... Thanks in advance for your further input!~

You can use Set Difference component. (Set> Sets> Set Difference).

Also no need to sort you list of numbers your looking for. Don't know how you made the set to search for but have a look at Cset for extracting only unique numbers from a list.

Attachments:

Thank you Matt for your solution, it simplifies my problem by miles.

I needed the tree structure to be retained and have the culled items as nulls.

So along your line of thought, I used Set Intersection to achieve it =) and it works great, thank you!

Attachments:

Thank you Mateusz for your direction, I understand the underlying problem of the occurrence now. However, when I try to eliminate the problem by rounding all the floats with an Interger component (assuming it gets rids of the problem....) it doesn't get rid of the problem. It seems like for this post here Integer does solve the problem, however....

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