How does Panel () component transform data?

Beginner question:

Passing the output of Series through a Panel() somehow changes it, and I’d like to understand how.

I don’t understand why the three lists on the rights aren’t all the same. What’s wrong with the middle row?

series_panel_question.gh (9.3 KB)

Hi @Nicholas_Putnam,

More experienced users can answer your question in better detail but from my understanding it has to do with string/text vs. numeric comparison.

when comparing number components you are comparing Floats and working with floating point precision.

if you put these same numbers into a panel or text node you are now comparing the string representation of said number.

so in some cases if your number is actually 0.00000000000000235298 but “reads” as 0 it may not equal a number of 0 that you are comparing against or an integer of 0 for instance.

if however you compare that long decimal number as text against itself it would match as it’s doing a string comparison. (I think?)

Here you can see the comparisons you are making. The middle example is comparing text against a number, the others are text against text.

By casting the text to a number you get the same result as your text to text comparison in this case.

I hope this helps you!

series_panel_question.gh (9.3 KB)

Thanks! This did help me.

How did you make those type labels appear?

@Nicholas_Putnam I first selected the component then used Ctrl+G to group it and then right click on the group and set the name of it:

image

That’s my personal preference, I use it as a sort of “code comments” method to explain to myself and others what the logic is doing in a certain area and to also type special keywords like “Deprecate” or “Can we speed this up?” so I can find it easy later

Similarly but different there is a plugin called Bifocals that will show the component name above it.

Skip to the 43 second mark

Since you can hover over a component and have the name displayed I find bifocals unnecessary but I know a lot of users who like it :man_shrugging:t4:

1 Like

Don’t do that :exclamation: Text panels are great for examining component outputs but they should be considered temporary, never inline, so they can be deleted without affecting GH results.

2 Likes