Expanding the Functionality of Optical CAD Using the Python Scripting Language
Аннотация:
Nowadays, scripting is becoming a basic functionality in a very large number of different applications. This paper considers the experience of expanding the program capabilities of the optical modeling system using the Python scripting language. A brief overview of existing solutions is discussed. The approach based on the method of using the unified entity interface is proposed, which makes the process of expansion of the system simple and convenient for both its developers and end users. The new program modules like script interpreter,script editor and built-in parametric object libraries have been designed and integrated into the optical modeling system to work with scenarios are considered in detail. Software extension mechanism by means of adding new script-based object classes is provided. Examples of using Python API for a number of simple operations and examples of work with some simulation and automation modules based on scenarios are considered.