ladybug-tools / ladybug-legacy

:beetle: Ladybug is an environmental plugin for Grasshopper.
http://ladybug.tools
Other
194 stars 82 forks source link

radiationRose scale - Error #389

Closed ayezioro closed 7 years ago

ayezioro commented 7 years ago

Hi, When applying scale factor to the radiationRose it give sthe following error:

Runtime error (MissingMemberException): 'int' object has no attribute 'Translate' Traceback: line 205, in visualizeData, "" line 350, in main, "" line 377, in script

Can't find how to fix ... Thanks, -A.

devangcx commented 7 years ago

Hi @ayezioro, I just tried scale on the Radiation Rose. Works fine without any errors. Can you share a file please?

ayezioro commented 7 years ago

Hi @devngc, Sure. You can find it in this discussion: http://www.grasshopper3d.com/group/ladybug/forum/topics/problems-with-radiation-result?page=2&commentId=2985220%3AComment%3A1759336&x=1#2985220Comment1759336 I've made sure i'm using the latest version. -A.

devangcx commented 7 years ago

Hi @ayezioro, Thanks for the link. Since the analysis period is less than a day, in order for the radiation rose to be of a reasonably visible size, @mostaphaRoudsari has applied 1000 scale by default. Therefore, when you apply a scale factor of 0.5 and 0.7, it gives you the error. I believe this is a planned behaviour and not a bug. @mostaphaRoudsari would you like me to alter the behaviour so that it displays a message instead of an error?

ayezioro commented 7 years ago

Thanks @devngc, I understand what you say, but even though the analysis in the file is a day (or less), the size of the rose is pretty big (as you can see in the top view). Also if you input a scale value of 1 or bigger the component fails. I see that if i input the skyMatrix for the whole year it works fine. What is weird is that the default size of the year rose is smaller than the day only. -A.

chriswmackey commented 7 years ago

@ayezioro and @devangc , Because this component is so old, I know that the code for it is a bit messy, it has some rhinoscriot parts (instead of rhinocommon), and it is easy for it to fail. I'll try to take a look at some point.

devangcx commented 7 years ago

@ayezioro and @chriswmackey, Can you please try this file? I have only addressed the scale issue. I have kept the default scale factors 1 (for selSkyMtx less than a day) and 1000 (for selSKyMtx greater than a day) as is.

ayezioro commented 7 years ago

Thanks @devngc, Seems to be working fine. I assume that Chris will overhaul the whole code and take your fix as a part of it. Until then and in order not to loose the fix, maybe commiting the change will be helpful. Thanks again, -A.

devangcx commented 7 years ago

@ayezioro, Thank you for your time.

mostaphaRoudsari commented 7 years ago

Thanks @devngc for taking care of this. I agree with @ayezioro's comment. Let's get it fixed for now and we will get re-write the whole code for the plus version.