[Hotfix Main]: [FXC-5592] Results model for (TimeAveraging)ForceDistributionOutput#1818
[Hotfix Main]: [FXC-5592] Results model for (TimeAveraging)ForceDistributionOutput#1818piotrkluba merged 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| for h in headers | ||
| ): | ||
| self._variables = list(self._VARIABLES_CUMULATIVE) | ||
| self._filter_when_zero = list(self._VARIABLES_CUMULATIVE) |
There was a problem hiding this comment.
Vacuous truth silently defaults to cumulative on empty data
Low Severity
In CustomForceDistributionResultCSVModel._preprocess, when self._values is falsy (e.g., None or empty dict {}), headers becomes an empty set. Python's all() on an empty iterable returns True (vacuous truth), so the method silently classifies the data as cumulative and sets _variables and _filter_when_zero to cumulative values without any actual evidence from the data. This bypasses the Flow360NotImplementedError that the else branch is designed to raise for unrecognized data, potentially masking issues during debugging.


Hotfix of PR #1817 (#1817) to the
mainbranch.Hey @piotrkluba, please review this hotfix PR created from your original PR.
Note
Medium Risk
Touches core results discovery/downloading and parsing logic, so regressions could affect existing monitor/UDD/custom-force result access and downloads.
Overview
Adds first-class support for
ForceDistributionOutput/TimeAverageForceDistributionOutputresults: introduces a genericNamedResultsCollectionModeland migratesMonitorsResultModel,UserDefinedDynamicsResultModel, andCustomForceResultModelto use it, while adding a newForceDistributionsResultModelthat discovers*_forceDistribution.csvfiles and exposes per-output access + bulk download.Extends
Case/SimulationParamsand the case results downloader to detect and optionally download these force-distribution results, adds parsing for both incremental and cumulative force/moment distributions (new output field constants,normal_directionaxis, andCustomForceDistributionResultCSVModel), and adds validation/tests to reserve the namesX_slicing/Y_slicingplus new test fixtures/mocked API responses for the new result files.Written by Cursor Bugbot for commit a6cc3c8. This will update automatically on new commits. Configure here.