FaceGroup Specification of min Passage Size#1826
FaceGroup Specification of min Passage Size#1826NasserFlexCompute wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for specifying min_passage_size at the face group level through the GeometryRefinement class. This allows users to override the global min_passage_size setting (from MeshingDefaults) for specific face groups, providing finer control over hidden geometry removal resolution.
Changes:
- Added
min_passage_sizefield toGeometryRefinementclass for per-face-group specification - Updated test to include
min_passage_sizeparameter in aGeometryRefinementinstance - Updated reference JSON to reflect the expected serialization format
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| flow360/component/simulation/meshing_param/face_params.py | Added min_passage_size as an optional field to GeometryRefinement class with appropriate type hints and description |
| tests/simulation/translator/test_surface_meshing_translator.py | Added test coverage for the new min_passage_size field in a GeometryRefinement refinement |
| tests/simulation/translator/ref/surface_meshing/gai_surface_mesher.json | Updated reference JSON to include the expected serialization of min_passage_size field |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
| description="Minimum passage size that hidden geometry removal can resolve for this face group. " | ||
| "Internal regions connected by thin passages smaller than this size may not be detected. " | ||
| "If not specified, the value is derived from geometry_accuracy and sealing_size.", | ||
| ) |
There was a problem hiding this comment.
Missing validation for min_passage_size against remove_hidden_geometry
Medium Severity
The min_passage_size field on GeometryRefinement lacks the validation that exists at the defaults level in MeshingDefaults, where validate_min_passage_size_requires_remove_hidden_geometry ensures min_passage_size is only specified when remove_hidden_geometry is True. The field description explicitly ties it to "hidden geometry removal," but a user can set it on a face group without remove_hidden_geometry being enabled globally, leading to a silently ignored or inconsistently validated parameter.


Note
Low Risk
Small additive schema change plus fixture/test updates; limited to Geometry-AI meshing parameters and should be backward compatible.
Overview
Adds per-face-group
min_passage_sizesupport toGeometryRefinement, allowing local control over the hidden-geometry removal passage threshold (otherwise derived fromgeometry_accuracy/sealing_size).Updates the GAI surface meshing translator reference JSON and the translator test to include and validate serialization of
min_passage_sizein refinement output.Written by Cursor Bugbot for commit 7cff547. This will update automatically on new commits. Configure here.