I have a need to apply a User Defined Aperture to a surface in Sequential mode. This aperture might need to be calculated automatically outside of OpticStudio, or be more complicated than what the .UDA text file format accommodates.
For example, I might be able to make a curved-slit aperture out of arcs, but the line-segment approximation that 'OpticStudio internally represents the arc as' might be too crude for my purposes. Or I might need to calculate an elliptical or other arbitrarily-curved arc segment that is not supported by UDA.
Ideally, I could calculate an aperture shape outside of OpticStudio, e.g. in Matlab or Python, and then use ZOS-API to apply this aperture to a surface. Then run the OpticStudio model using this aperture, either in 'Standalone' (Python routine calls OpticStudio) or in 'Inherent' (OpticStudio calls Python routine) mode.
I can also see it being useful if somebody wanted to do an optimization in which the shape/size of this externally-calculated aperture was variable using parameters that could be passed back and forth to OpticStudio.
Is anything like this supported, or do you have a suggestion on the best way to do it?
-- Greg