Grasshopper

generative modeling for Rhino

  • Blog Posts
  • Discussions (6)
  • Events
  • Groups
  • Photos
  • Photo Albums
  • Videos

Ahmed ElHusseiny's Discussions

Replacing negative values with zero (0)
7 Replies

Hello All, I have a list with both positive and negative values. I need to replace all the negative values with zero and maintain the original tree structure. Does anyone know of a good way to do…Continue

Tags: Lists

Started this discussion. Last reply by Ahmed ElHusseiny Apr 13, 2011.

 

Ahmed ElHusseiny's Page

Latest Activity

Ahmed ElHusseiny replied to Ahmed ElHusseiny's discussion Replacing negative values with zero (0)
"even better!"
Apr 13, 2011
David Rutten replied to Ahmed ElHusseiny's discussion Replacing negative values with zero (0)
"You could also use the Max() function, it's slightly less typing:   Max(x, 0.0)   Max() returns the higher of two numbers, so if x is less than zero, zero is returned. there is even a Max component (Math.Util), so you don't have…"
Apr 13, 2011
Pieter Segeren replied to Ahmed ElHusseiny's discussion Replacing negative values with zero (0)
"I should have posted this..."
Apr 13, 2011
Ahmed ElHusseiny replied to Ahmed ElHusseiny's discussion Replacing negative values with zero (0)
"That works too! thanks Danny."
Apr 13, 2011
Ahmed ElHusseiny replied to Ahmed ElHusseiny's discussion Replacing negative values with zero (0)
"That did the trick. Thank you very much!"
Apr 13, 2011
Danny Boyes replied to Ahmed ElHusseiny's discussion Replacing negative values with zero (0)
"You can use an If statement in the Fx component. Just replace my x*y in the example with your existing function: If(x*y>0,x*y,0)"
Apr 12, 2011
Ahmed ElHusseiny replied to batchku's discussion Grasshopper on Mac / OS X revisited?
"Adding my voice to those waiting (kind of) patiently"
Apr 12, 2011
Ahmed ElHusseiny posted a discussion

Replacing negative values with zero (0)

Hello All, I have a list with both positive and negative values. I need to replace all the negative values with zero and maintain the original tree structure. Does anyone know of a good way to do this? Many thanks! See More
Apr 12, 2011
Ahmed ElHusseiny replied to Newsum's discussion Offset- data problem
"I've been having the same issue. Also the offset module does not seem to like negative values. I haven't been using grasshopper since the 6.xxxxx builds so maybe I'm missing something..."
Apr 6, 2011
Ahmed ElHusseiny updated their profile
Oct 23, 2009
Ahmed ElHusseiny is now a member of Grasshopper
Oct 23, 2009

Comment Wall

You need to be a member of Grasshopper to add comments!

Join Grasshopper

  • No comments yet!
 
 
 

Translate

Search Grasshopper

Photos

  • Add Photos
  • View All

© 2013   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service