function export_case() %EXPORT_CASE 按 case_config.m 导出本算例的 OpticsFEM JSON。 [phy, cfg] = case_config(); root = fileparts(mfilename('fullpath')); addpath(fullfile(root, '..', 'common')); jsonPath = fullfile(root, cfg.jsonFile); export_phy_to_json(phy, jsonPath, cfg); fprintf('复制到 C++ Release: copy %s → scat3D_SBC\\Release\\\n', cfg.jsonFile); end