It is not possible to retrieve glass material types in the usual manner for two of the glass types available in the materials lib, these are misc_soda-lime and hikari_i-line. This is because they have a minus sign in the name which is not valid for python attribute access, will be parsed as a subtraction operator.
>>> material.misc_soda-lime['Rubin-clear']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'pyoptools.raytrace.mat_lib.material' has no attribute 'misc_soda'
A work around is to use the following:
soda_lime_glass = getattr(material, 'misc_soda-lime')['Rubin-clear']
My suggestion would be to replace the minus signs with underscores.
It is not possible to retrieve glass material types in the usual manner for two of the glass types available in the materials lib, these are
misc_soda-lime
andhikari_i-line
. This is because they have a minus sign in the name which is not valid for python attribute access, will be parsed as a subtraction operator.A work around is to use the following:
soda_lime_glass = getattr(material, 'misc_soda-lime')['Rubin-clear']
My suggestion would be to replace the minus signs with underscores.