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:
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
Tags:
thanks, I was looking for this
Hi Pieter,
I'm all for new components, it's like birthday presents, but with space on the toolbar at a premium, I have to question some of these.
- Line from MidPoint to End- or Startpoint component *
- Line from MidPoint, Direction and Length component *
- Curve Intersection with incorporated Shatter and List Item functionality
I'm of the firm belief that a Component should do one thing, and it should do that one thing well. (currently Offset does not fall into this category)
- Extrude From Point component *
How does this differ from Extrude to a Point?
- Switch component, switches between input 1 and 2 *
There is a filter Gate component in Sets>Tree combined with a boolean toggle this works well.
- Tube component
Is this the same as a cylinder?
Hi Pieter,
Don't get me wrong, I'm all for a better Grasshopper and I think better tags and a mean curve component would be good additions, but it's not up to me, unfortunately. I was just opening it up to discussion. And I see whilst some things that are easily achieved like tube and truncated cone it would be nice to have such components available, even if they were relegated to the drop-down only.
Keep 'em coming!
I should quantify the relegated comment so as not to offend: like my two recent requests for 1/x and -x in order to keep toolbar usage to a minimum they have been relegated to only being available on the drop-down
Not sure about useful. These components don't actually provide any functionality that wasn't there already. It will allow you to make a more readable network under certain conditions, but that's about it. Also note that all of these components are only available on the dropdown panels. Button space on the toolbar is at a premium.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Hi Mateusz,
I wrote a smart hashtable for this stuff, so trivial rejection is O(1) while collision testing is just a wee bit slower. There's always a lot of overhead in Grasshopper because all data needs to be re-interpreted at every parameter, but apart from that I think it's quite fast.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
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