-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Void modifier isn't exported correctly within global_modifier_set #121
Comments
@MingboPeng, this looks right to me. It's basically equal to this radiance material:
There is no separate void modifier. What would you expect to see? |
@mostaphaRoudsari thanks for explaining, I think I found the reason causing issues: 1. Type: is there any specific reason that we use all lowercase here, while the rest objects are all pascal case (glass vs Glass). 2. Optional: adding a default value already makes this field optional, why do we need the Optional key here for refraction_index? This makes |
Actually I believe all the modifiers are lowercase types. You can see this in the samples: https://github.com/ladybug-tools/honeybee-schema/blob/master/samples/modifier/modifier_mirror_invisible.json
I believe only adding a default of None makes it nullable. But in the refraction_index case because we have a non-None default, but we need to have None as an potion, we have defined it explicitly as an Optional. |
Yes, all the modifiers are lowercase, and the rest are not.
But make default =1.52 won't make it nullable.
So why do we want refraction_index as None while default can be 1.52? What does None mean for refraction_index? |
We set the field as |
I guess this refraction_index will be rarely set in Radiance, because in most common cases, users are using the normal glass. That's why you want not to add 1.52? If this is true, can we create another class: GlassRI, in which refraction_index has to be set or by default 1.52, it cannot be null. |
Re: refraction glass - yes. your understanding is correct. @chriswmackey, how do you feel about removing the refraction index from the dictionary when the value is not set? Do we have a rule for such keys in the Python library? I can try to change the type from lower-case to upper case in both honeybee-radiance and the schema if @chriswmackey is fine with this change. |
@mostaphaRoudsari I have updated the dotnet schema to ignore all nulls from json file when de-serializing. This should be fine fro json file created by python with nulls at where it shouldn't be. But not sure if there is any other cases we want to keep nulls when we make null means something. But getting back to glass refraction index: If this is the case: |
|
Has this been addressed @MingboPeng and @mostaphaRoudsari ? Or do we need to go through the shcema and take out all use of |
Everything is working currently as is but we have to go back and fix this at some point. I'm fine with removing In the case of refraction index let's just go with the default value. I'm not sure if we want to make an object for float values. It's not ideal but a helpful compromise. |
I am using this exported model to test schema .net: https://raw.githubusercontent.com/ladybug-tools/honeybee-schema/master/samples/model/model_complete_single_zone_office.json
In global_modifier_set, this void modifier shouldn't be existed alone with other modifiers unless I am misunderstanding this modifier:
cc @mostaphaRoudsari
The text was updated successfully, but these errors were encountered: