Added radius and crinkling options to MeshSliceOutput#1611
Merged
sashok-flex merged 6 commits intomainfrom Nov 21, 2025
Merged
Conversation
sashok-flex
commented
Nov 21, 2025
flow360/component/simulation/translator/volume_meshing_translator.py
Outdated
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
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_slicesandcutoff_radiusfields toMeshSliceOutputmodel - Updated translator to map these fields to JSON output format (
crinkledandcutoffRadius) - 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
approved these changes
Nov 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.