API控制
为复合表面添加了,IsCompositeSurface 和 SetOffAxisTiltAndDecenter() 两个新的 API 命令。
IsCompositeSurface 用于此参数的 Sets 和 Get 值。SetOffAxisTiltAndDecenter() 根据离轴表面孔径中心的复合表面基面法线矢量计算得出所需填充的恰当属性值。
下面提供一个 Python 代码的示例片段供参考:
TheSystem = TheApplication.PrimarySystem;
TheLDE = TheSystem.LDE
# Get Surface j Information
CompositeTest = TheLDE.GetSurfaceAt(j)
# Check “Composite Surface:Add sag to the next surface”
CompositeTest.CompositeData.IsCompositeSurface=1
# Press “Set Tilt/Decenter to follow Base surface aperture” button
CompositeTest.CompositeData.SetOffAxisTiltAndDecenter()
# Extract Composite Surface Tilt/Decenter value
CompositeTiltX=CompositeTest.TiltDecenterData.BeforeSurfaceTiltX
CompositeTiltY=CompositeTest.TiltDecenterData.BeforeSurfaceTiltY
CompositeTiltZ=CompositeTest.TiltDecenterData.BeforeSurfaceTiltZ
CompositDecenterX=CompositeTest.TiltDecenterData.BeforeSurfaceDecenterX
CompositDecenterY=CompositeTest.TiltDecenterData.BeforeSurfaceDecenterY
# Change the Tilt/Decenter values manually
CompositeTest.TiltDecenterData.BeforeSurfaceTiltX = 0
CompositeTest.TiltDecenterData.BeforeSurfaceDecenterY = 0API控制
还有用于复合表面的新 ZPL 宏命令。
COMPOSITEON(surface number) - 关键字
COMPOSITEOFF( surface number ) - 关键字
COMPOSITEOFFAXISAPERTUREON ( surface number ) - 关键字
ISCS(surface number) ->returns 1|0 - 数值函数
ISCS() 当表面不是复合表面时将返回 0,如果表面是复合表面则返回 1。
有关这些命令的详细信息,请参阅帮助文件。提供了一些示例代码供参考:
! Uncheck the composite surface checkbox
PRINT "Turn off composite surface j"
COMPOSITEOFF j
A = ISCS(j)
! ISCS () return 0 if it's not composite surf., return 1 if it's composite
surf.
IF (A < 0.5)
PRINT &#34; ==> Composite surface flag is OFF&#34;
ELSE
PRINT &#34; ==> Composite surface flag is ON&#34;
ENDIF
! Check the composite surface checkbox
PRINT &#34;Turn on composite surface j&#34;
COMPOSITEON j
A = ISCS(j)
IF (A > 0.5)
PRINT &#34; ==> Composite surface flag is ON&#34;
ELSE
PRINT &#34; ==> Composite surface flag is OFF&#34;
ENDIF
! Press the &#34;Set Tilt/Decenter to follow Base surface aperture&#34; button
PRINT &#34;Set Tilt/Decenter to follow Base surface aperture&#34;
COMPOSITEOFFAXISAPERTUREON j
PRINT &#34; ==> Click Tilt/Decenter to follow Base surface aperture
button&#34;结论
本文介绍了 Zemax OpticStudio 22.3 和 Ansys Zemax OpticStudio 2022 R2.02 中的复合表面功能。它扩展了 OpticStudio 中的许多新功能和可能性,希望它能帮助您更加高效工作,期待您的反馈!