Grasshopper

algorithmic modeling for Rhino

I'd like to make a simple VB.NET component that tests a value against a list of domains and sets the value to the lowest value in the domain in which it is included. The problem I'm having is that I don't really know how to deal with domains in my script. I've set the type hint to Interval hoping to get some helpful tips and I've looked in the SDK help file at Interval1D, but I'm not even sure this is what I need/want.

VB.NET Component:

input V = list of values, Item Access

input D = list of domains, List Access

Output A = list of values where each value is at the minimum of the domain in which it's included

Some hints and tips with dealing with a list of Domains would be great... even better than a working solution, so I can learn by doing.

Thank!

Views: 1204

Attachments:

Replies to This Discussion

Hello Damon

I see you are asking for VB.Net script, but i thought i share something that may be doing what you are after using evaluate expression component (if statement)

cheers

alex

Hi Damon,

You can use the Interval.IncludesParameter method to check whether specific value(s) are included in a list of domains(intervals). If they are, you can use the Min property of an interval in which the value has been included.

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