Grasshopper

algorithmic modeling for Rhino

Eval component not outputting a floating double number

I think I'm seeing a situation in when the expression component has floating double numbers for the inputs, but outputs a single number.  In the attache example it causes an out of range error in the evaluate curve component.

Take a look at the values in branch 6;  the source numbers in branch 6 are floating doubles.  However, once it exits from the eval component the result seems to be a single.

I thought all computations / results coming out of the expression component are floating doubles;  is there something wrong I have in the formula?

Views: 665

Attachments:

Replies to This Discussion

Hello Norm,

I believe this has to do with the number of decimal places displayed.

So the two numbers on your final list that are supposed to be 0 and 1 are actually -0.something and 1.something.

If you round all the numbers from your initial list to, let's say, 6 decimal places it should work ok.

(to round them use the expression "Round(x,6)"):

Hi Nikos... thanks for the suggestion.  I just tried it (although not in the exact way that you mention.)  What I want is the expression component (not the expression parameter modifier) to return a floating double (12 decimals).  I tried entering "Round((.5-(y-x))/2,12)" but that still didn't work - it maxes out at 6 decimals.

Hi Norm,

6 decimals is the standard panel display but the extra digits are still there.

The problem is that if you don't round the numbers to a couple of decimal places, then the 0 and 1 will still give you troubles...

Anyway, I was recently referred to these discussions:

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