Grasshopper

algorithmic modeling for Rhino

Rounding numbers to specific values (aka compare and replace)

Morning,


I have reached my final impasse in a setting out process using GH. I am trying to round values in a string to defined numbers based on their proximity to each value. This is how I have tried to tackle it:


  • I have a list of 45 values from a function
  • I have a list of 10 domains
  • I have a list of 10 values I want to use to replace others


I want to create an expression that looks at the 45 values one by one and tests which domain the value is in, then replace it with one of the values in the bottom string. 


Does anyone know how to do this? I suspect it involves using the replace data thing. Not sure. 


Thanks, 


A

Views: 1862

Attachments:

Replies are closed for this discussion.

Replies to This Discussion

hth

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