Grasshopper

algorithmic modeling for Rhino

Hello. I'm absolutely new to grasshopper, so sorry if this is a really simple question, but I Want to import a list of values and convert them into binary, represented with 1s and 0s, and use this list as a series of true-false statements. But I'm having issues converting the list to binary. I have a clunky solution at the moment, but it limits me to values of 511. It will likely work for the purposes I plan to use it for, but what would be a more foolproof way of going about this

Views: 1382

Replies to This Discussion

It's tricky, would you settle for a solution using C# code?

C# solution attached.

Attachments:

Wow, that was fast and much more elegant! Thank you so much!

Just for shits and giggles, here's a version using GH native components plus anemone. I'm 100% sure this could be done more elegantly but my brain hurts :) For any practical purposes you should obviously use David's script! 

Attachments:

While I think you're right that David's script is more practical, I'll definitely comb through this just for the learning potential. Thanks, Andrew!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service