From 5983f62e0415ce4d22de1a8822f5479adf7b3fc9 Mon Sep 17 00:00:00 2001 From: Weiliang Jin Date: Thu, 30 Oct 2025 16:49:59 -0700 Subject: [PATCH] fix(rf): Default value of angle_threshold in CornerFinderSpec is now 0.25pi --- CHANGELOG.md | 3 ++- schemas/EMESimulation.json | 4 ++-- schemas/ModeSimulation.json | 4 ++-- schemas/Simulation.json | 4 ++-- schemas/TerminalComponentModeler.json | 4 ++-- tidy3d/components/grid/corner_finder.py | 2 +- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51559e3c1b..d22fff6c1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added multimode support to `WavePort` in the smatrix plugin, allowing multiple modes to be analyzed per port. ### Breaking Changes +- Edge singularity correction at PEC and lossy metal edges defaults to `True`. +- `angle_threshold` in `CornerFinderSpec` now defaults to `pi/4`. **Note: These breaking changes only affect the microwave and smatrix plugins.** - Renamed path integral classes for improved consistency. Please see our migration guide for details on updating your code. - `VoltageIntegralAxisAligned` → `AxisAlignedVoltageIntegral` @@ -51,7 +53,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Unified run submission API: `web.run(...)` is now a container-aware wrapper that accepts a single simulation or arbitrarily nested containers (`list`, `tuple`, `dict` values) and returns results in the same shape. - `web.Batch(ComponentModeler)` and `web.Job(ComponentModeler)` native support - Simulation data of batch jobs are now automatically downloaded upon their individual completion in `Batch.run()`, avoiding waiting for the entire batch to reach completion. -- Edge singularity correction at PEC and lossy metal edges defaults to `True`. ### Fixed - Ensured the legacy `Env` proxy mirrors `config.web` profile switches and preserves API URL. diff --git a/schemas/EMESimulation.json b/schemas/EMESimulation.json index 81dafffe89..92c3ce4a2a 100644 --- a/schemas/EMESimulation.json +++ b/schemas/EMESimulation.json @@ -2316,7 +2316,7 @@ "additionalProperties": false, "properties": { "angle_threshold": { - "default": 0.3141592653589793, + "default": 0.7853981633974483, "exclusiveMaximum": 3.141592653589793, "minimum": 0, "type": "number" @@ -6361,7 +6361,7 @@ } ], "default": { - "angle_threshold": 0.3141592653589793, + "angle_threshold": 0.7853981633974483, "attrs": {}, "concave_resolution": null, "convex_resolution": null, diff --git a/schemas/ModeSimulation.json b/schemas/ModeSimulation.json index c14f7019f6..2575a602d9 100644 --- a/schemas/ModeSimulation.json +++ b/schemas/ModeSimulation.json @@ -2359,7 +2359,7 @@ "additionalProperties": false, "properties": { "angle_threshold": { - "default": 0.3141592653589793, + "default": 0.7853981633974483, "exclusiveMaximum": 3.141592653589793, "minimum": 0, "type": "number" @@ -5574,7 +5574,7 @@ } ], "default": { - "angle_threshold": 0.3141592653589793, + "angle_threshold": 0.7853981633974483, "attrs": {}, "concave_resolution": null, "convex_resolution": null, diff --git a/schemas/Simulation.json b/schemas/Simulation.json index d141839628..706ca194f7 100644 --- a/schemas/Simulation.json +++ b/schemas/Simulation.json @@ -2736,7 +2736,7 @@ "additionalProperties": false, "properties": { "angle_threshold": { - "default": 0.3141592653589793, + "default": 0.7853981633974483, "exclusiveMaximum": 3.141592653589793, "minimum": 0, "type": "number" @@ -9061,7 +9061,7 @@ } ], "default": { - "angle_threshold": 0.3141592653589793, + "angle_threshold": 0.7853981633974483, "attrs": {}, "concave_resolution": null, "convex_resolution": null, diff --git a/schemas/TerminalComponentModeler.json b/schemas/TerminalComponentModeler.json index 230d3c9aeb..e23feacd4d 100644 --- a/schemas/TerminalComponentModeler.json +++ b/schemas/TerminalComponentModeler.json @@ -2840,7 +2840,7 @@ "additionalProperties": false, "properties": { "angle_threshold": { - "default": 0.3141592653589793, + "default": 0.7853981633974483, "exclusiveMaximum": 3.141592653589793, "minimum": 0, "type": "number" @@ -9228,7 +9228,7 @@ } ], "default": { - "angle_threshold": 0.3141592653589793, + "angle_threshold": 0.7853981633974483, "attrs": {}, "concave_resolution": null, "convex_resolution": null, diff --git a/tidy3d/components/grid/corner_finder.py b/tidy3d/components/grid/corner_finder.py index 6c71cd0c46..cfb613d63e 100644 --- a/tidy3d/components/grid/corner_finder.py +++ b/tidy3d/components/grid/corner_finder.py @@ -15,7 +15,7 @@ from tidy3d.components.types import ArrayFloat1D, ArrayFloat2D, Axis, Shapely from tidy3d.constants import inf -CORNER_ANGLE_THRESOLD = 0.1 * np.pi +CORNER_ANGLE_THRESOLD = 0.25 * np.pi class CornerFinderSpec(Tidy3dBaseModel):