Grasshopper

algorithmic modeling for Rhino

Hey everyone,

 

I've added a bunch (I won't say 'set') of components that expose Mathematical Set like operators. These components work on simple data types only:

  • Booleans
  • Integers
  • Numbers
  • Complex Numbers
  • Strings
  • Points
  • Vectors
  • Colours
  • Intervals

You cannot use them on anything else (at present at least). The following examples all use Strings, but that's just to make it obvious what's happening. Basically I'm looking for ideas for other (useful) components that operate on sets.

 

A note on Sets (read the Wikipedia article for a basic explanation). A Set is a collection of distinct objects. You shouldn't be able to find the same object twice in the same set. Objects inside sets are referred to as "members". Although in actual Set Theory, a set can contain other sets (it could even contain itself), this is not possible within the framework of Grasshopper. It's easiest to think of Sets as special Lists that don't allow more than one instance of a specific value. Some operators require this property, others don't. I might decide not to enforce it after all.

 

Here's a list of components which I already coded up.

 

Create Set. Convert a list of values into a proper Set (no duplicates, no nulls):

 

 

Set Union. Combine all members of two sets:

 

 

Set Difference. Remove all members from A that also occur in B:

 

 

Set Symmetric Difference. Remove all members from A that occur in B and vice versa:

 

 

Subset. Test whether all the members in Set B are also present in Set A:

 

 

Set Intersection. Create a new set which contains all members that are present in A and B:

 

 

Set Carthesian Product. (Only works on sets with identical cardinality):

 

 

Replace members. Replace all members in A that match some value with another value:

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Views: 7000

Replies to This Discussion

 

I was waiting for this :]


I have just finished my post about these "New Set Components" but I will send an email; it is a long post.

Maybe the post should be open up to discussion. If anyone think so, please reply.

 

Hi David!

 

My wish for the next release :

 

Thanks

 

Benoît

This is great, are these components in the v0.8.0007??

Hi Aida,

 

nope, they will be in 0.8.0008 once I release it. I'd like to release today or tomorrow, even though there are still bugs (most notably with the slider) I haven't solved yet.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Hi bma,

 

you can add and remove curves once you click the "manage curve collection " to achieve the Curve Value Manager .

 

And hi The David ,

 

I  donot know weather or not the idea is crazy or impossible at all ,but I want to tell out ,again . This idea is about all kind of value managers (point value manager ,curve value manager, etc) . I refer 4 points  to a point  param ,then I delete one of them .After that , the point param would turn yellow .Then I open the Point Value Manager to see which point was deleted .o yes ,it is the second one .The point is here : I want to refer one new point adding to the  point list and replace the missing point ,how ?? If I can do this from within this Point Value Manager UI ,it would be deadly flexible and useful !! What do you think ??

 

Hi Alpha222,

 

Sorry, a picture is not enough to explain my point.

 

Actually, if you want to add(/remove) geometries to a Curve/Point/Brep/Surface... component, you have 3 options:

1) you select all the geometries in a component ("set multiple 'geometries'"). If you have 100 curves and would like to add(/remove) 1, you need to select 101(/99) curves in Rhino, it could be annoying.

2) you use the "manage 'geometry' collection" with the Object ID but I don't like this way.

3) you create a new component with the new geometries and you merge the two components.

 

My point is that it would be useful to add/remove geometries like you set them by picking them up in Rhino, the current collection being selected automatically.

Sorry for the misunderstanding bma .

Value Manager cant do everything in fact . I guess we are asking for something luxuxy .

is set union will unite two bolean set into 2 items (true and false)?

Yes, pretty much. Set Union differs from simply merging the data since it removes all duplicates. So if you Union two sets of boolean values each containing 15 million values, you'd probably end up with {False, True}.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

wish^  - i`d like to somehow  "save" data (at least strings) inside gh. For example, I maked a list of points, now i want to store this list inside gh. For now i am saving panel as text, then copypaste this text into new panel... it is little bit wired....

Hi Philipp,

 

you can Copy the contents of a TextPanel to the clipboard via the menu since 0.8.0005.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

hm ok thnks

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service