
How LensForge looks up glasses
When you type a glass name into the surface data spreadsheet, the following procedure is followed:
- The glass name is converted to upper case. i.e., bk7 becomes BK7.
- If there is an underscore in the name, the name is broken into a glass name and catalog name. i.e., BK7_SCHOTT becomes glass name BK7 and catalog name SCHOTT. This is for compatibility with CODE V style data entry.
- If the catalog name is not valid (not present in the system glass library), the original name is used. This is to allow glass names that do contain underscores, such as F_SILICA found in the INFRARED catalog.
- The glass is looked up in the glass cache for the lens (this is what you see when you look at Glasses from the System menu). The glass must match glass name and (if specified) catalog name.
- If not found, the glass is looked up in the system library. The glass must match glass name and (if specified) catalog name.
- If not found, the glass is looked up in the ZEMAX library or OSLO library whose path is specified on the Preferences panel. Which path is used depends on whether the file being opened is a ZEMAX or an OSLO file. [this step is present for historical reasons].
- If still not found, a dummy glass is created.
The special glass name MIRROR is used to indicate a reflecting surface.