Grasshopper

algorithmic modeling for Rhino

Hello everyone,

I build a Boolean-switch based on a counter from Kangaroo 1+ GH component evaluate.

The idea is that the switcher turn on/off when the counter value reach a certain threshold.

GH definition loaded.

It supports to be like this:

0-20      : true

from 21 : false

but this is what I get:

0-1        : true

2-10      : false

11-20    : true

from 21 : false

I have no clue what is happening to value 2-10?

Even trying component ‘expression’ the problem still the same.

Does anyone know where the problem is?

Views: 861

Attachments:

Replies to This Discussion

Do not enter text (output panel) into the evaluate, convert it to number between panel and evaluate components.

It looks like this is because passing it through the panel is converting it to a string and then it's evaluating two strings against one another.  Either lose the panels or plug them into an integer parameter component to cast them to the right type before plugging them into the Eval.

Yup, Panels are glorified Text parameters. You should never run data through a panel. Not only will it change the type (from number/colour/point/vector/etc. to text) it will often round numeric values, leaving you with less accurate data than before.

This was clearly a design mistake on my part I will not make again for GH2. Panels are primarily used to view data, as as such should not be in the business of changing data. But there you are.

thank you all, the hint is useful!!

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