From 64bb5444184f8230782550ade4475535b1327eb1 Mon Sep 17 00:00:00 2001 From: benflexcompute Date: Thu, 9 Oct 2025 10:26:45 -0400 Subject: [PATCH 1/3] Forbid interpolate to mesh when not forking --- flow360/component/project.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/flow360/component/project.py b/flow360/component/project.py index 2f2fe1750..78e2a8d1d 100644 --- a/flow360/component/project.py +++ b/flow360/component/project.py @@ -1683,6 +1683,12 @@ def run_case( Case | Draft The case asset or the draft if `draft_only` is True. """ + + if interpolate_to_mesh is not None and fork_from is None: + raise Flow360ValueError( + "Interpolation to mesh is only supported when forking from a case." + ) + self._check_initialized() case_or_draft = self._run( params=params, From fb9c4ca96e6d23664bf3dcf8618b92a42fff5a44 Mon Sep 17 00:00:00 2001 From: benflexcompute Date: Thu, 9 Oct 2025 10:27:28 -0400 Subject: [PATCH 2/3] Change error type --- flow360/component/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow360/component/project.py b/flow360/component/project.py index 78e2a8d1d..7646fb4a0 100644 --- a/flow360/component/project.py +++ b/flow360/component/project.py @@ -1685,7 +1685,7 @@ def run_case( """ if interpolate_to_mesh is not None and fork_from is None: - raise Flow360ValueError( + raise Flow360ConfigError( "Interpolation to mesh is only supported when forking from a case." ) From 07f5d66b09dfc34beb64e9e99682bf53cf28391e Mon Sep 17 00:00:00 2001 From: benflexcompute Date: Thu, 9 Oct 2025 10:41:45 -0400 Subject: [PATCH 3/3] Fix lint --- flow360/component/project.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/flow360/component/project.py b/flow360/component/project.py index 7646fb4a0..45440b197 100644 --- a/flow360/component/project.py +++ b/flow360/component/project.py @@ -48,7 +48,12 @@ wrapstring, ) from flow360.component.volume_mesh import VolumeMeshV2 -from flow360.exceptions import Flow360FileError, Flow360ValueError, Flow360WebError +from flow360.exceptions import ( + Flow360ConfigError, + Flow360FileError, + Flow360ValueError, + Flow360WebError, +) from flow360.log import log from flow360.plugins.report.report import get_default_report_summary_template from flow360.version import __solver_version__