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: 6959

Replies to This Discussion

thank you, i am looking forward for those!

thanks, I was looking for this

 

 

fabulous!
Hi David, I like the new components already! And since you're asking, I do have some wishes.
I've categorized them:

Components:
- Color for tags (to make them more readable)
- Offset Curve with inside/outside direction (Andrew Heumann's solution works great: http://www.grasshopper3d.com/xn/detail/2985220:Comment:183661)
- Line from MidPoint to End- or Startpoint component *
- Line from MidPoint, Direction and Length component *
- Curve Intersection with incorporated Shatter and List Item functionality *
- Input Split into both pos and neg value (I work a lot around the origin) *
- Extrude From Point component *
- Mean Curve component *
- Switch component, switches between input 1 and 2 *
- Tube component
- Trunated Cone component

  * but cleaner/more efficient than my UserObject ;)  Though I do like finding workarounds, I prefer cleaner flow.

UI:
- Handles on the wires (to get an easier view of the flow, I'd like to make it more like a circuit board where necessary)
- Optional grid snapping for wires and components ( and I too like to be able to lock them in place, I'm throwing my sliders all over the place)
- Option to (more easy) move Userobjects in their tab
- I'd really like the remote control panel back (I got just one monitor)
- Better visability for 'sectected item' ( I need to use the sphere and pipe too often to identify the points and curves)

GHSite:
- Solution found Y/N column for discussions (to be declared by the discussion starter of coarse)
- Categoriziation for discussions, named after the corresponding GH-Tab.
- Inject discussion url (and maybe creator name)  into the uploads (so we can respond more easy, and give credit to the right person)

Regards, Pieter
Attachments:

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 Danny,

it's clear to me that I have a wishlist that is too personal, and I'm glad you've pointed that out. I did make some UserObjects to accomodate me. Just thought that it could help other users too, and they would want these components to be nice and clean, thus the most efficient (but I can't code).
But you've made your point and I agree with you now, do-one-thing-good components only, and make my own if I need them.

Also, about the switch you are completely right. Thanks for clearing that up, now I can make room in my User Tab:)
Then to answer your questions: The Extrude From Midpoint is the other way around from the Extrude To Midpoint, so away from it. The Tube was meant to be like the Rhino Tube command. So with outer and inner diameter and a length. I'll make some more UserObjects ;)!
I hope you found some of the rest of my well-meant feedback usefull, because I was really only trying to help.

Regards!

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 Danny, there was nothing offending in your remarks, in fact I was glad you pointed out that I might be asking for too specific/personal components that would clog the toolbar. As you will have concluded from my wishlist I find readability of the flow/network very important too. So the components you mentioned, I trust that you made them yourself, right? I did:)
carthesian product, member index and valid are awesome. is valid set fast enought ? i mean - how it works with really large sets ?

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

I think that this is the biggest progress/advantage since latest few builds :) cant wait for it .

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