Skip to content

Added radius and crinkling options to MeshSliceOutput#1611

Merged
sashok-flex merged 6 commits intomainfrom
sashok/meshSliceParameters
Nov 21, 2025
Merged

Added radius and crinkling options to MeshSliceOutput#1611
sashok-flex merged 6 commits intomainfrom
sashok/meshSliceParameters

Conversation

@sashok-flex
Copy link
Collaborator

Added a radius field and crinkling option to MeshSliceOutput.

These fields are added to MeshSliceOutput and not Slice based on Ben's advice: "Entities should just store information about their definition, settings should be ideally be separated out. How the entities are used do not define the entities."

radius is marked Optional because it is allowed to be None, in case the user wants an infinite radius slice (which is what we currently output). I tried to default radius to infinity, but it broke JSON translations.

@sashok-flex sashok-flex marked this pull request as ready for review November 21, 2025 18:02
Copilot AI review requested due to automatic review settings November 21, 2025 18:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds two new optional fields to the MeshSliceOutput class: include_crinkled_slices (boolean) to control whether crinkled slice outputs are generated, and cutoff_radius (optional float) to specify the radial extent of slice outputs. These fields allow users to configure slice output behavior at the output level rather than at the entity level, following the principle that entities should store definition information while settings should be separate.

Key changes:

  • Added include_crinkled_slices and cutoff_radius fields to MeshSliceOutput model
  • Updated translator to map these fields to JSON output format (crinkled and cutoffRadius)
  • Expanded test coverage to validate all combinations of the new fields

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
flow360/component/simulation/meshing_param/volume_params.py Added include_crinkled_slices and cutoff_radius fields to MeshSliceOutput class with appropriate types and descriptions
flow360/component/simulation/translator/volume_meshing_translator.py Added translate_mesh_slice_fields function to translate new fields to JSON format; simplified type annotation from Union[MeshSliceOutput] to MeshSliceOutput
tests/simulation/translator/test_volume_meshing_translator.py Expanded test cases to cover three scenarios: default slices, crinkled with cutoff radius, and crinkled without cutoff radius
tests/simulation/translator/ref/volume_meshing/ref_param_to_json_legacy.json Updated reference JSON to include expected output for all three test scenarios with crinkled and cutoffRadius fields
tests/simulation/translator/ref/volume_meshing/ref_param_to_json_inhouse.json Updated reference JSON to include expected output for all three test scenarios with crinkled and cutoffRadius fields

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@savithru-flex savithru-flex self-requested a review November 21, 2025 19:44
@sashok-flex sashok-flex enabled auto-merge (squash) November 21, 2025 19:51
@sashok-flex sashok-flex merged commit cc94e63 into main Nov 21, 2025
20 checks passed
@sashok-flex sashok-flex deleted the sashok/meshSliceParameters branch November 21, 2025 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants