bug(FXC-5154): add function to compute min radius#3246
Open
bug(FXC-5154): add function to compute min radius#3246
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors cylinder radius validation logic in the TCAD heat simulation module by extracting duplicate code into a reusable helper function. The changes improve code maintainability while preserving existing functionality for handling cylinders with radii that are too small for meshing.
Changes:
- Renamed constant
OPENCASCADE_CYLINDER_RADIUS_TOLtoCYLINDER_RADIUS_TOLfor better generality - Extracted minimum radius computation and clamping logic into new helper function
_get_cylinder_radii_with_meshing_tol - Refactored
_warn_small_cylinder_radiusvalidator to use the new helper function instead of duplicating logic
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6ba06ba to
e6fc814
Compare
Contributor
Diff CoverageDiff: origin/develop...HEAD, staged and unstaged changes
Summary
|
e6fc814 to
18d3319
Compare
18d3319 to
caf82c9
Compare
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.
Note
Low Risk
Localized refactor affecting only pre-simulation geometry validation and warning messages; no solver/runtime behavior changes beyond when warnings are emitted.
Overview
Refactors the small-cylinder-radius validation in
HeatChargeSimulationby introducing_get_cylinder_radii_with_meshing_tol()to compute/clamp cylinder radii to a minimum meshing-safe value.Replaces the previous inline
min_radiuscomputation (formerly tied toOPENCASCADE_*naming) withCYLINDER_RADIUS_TOLand updated warnings that trigger when radii are clamped (including handling of negative/too-small radii).Written by Cursor Bugbot for commit caf82c9. This will update automatically on new commits. Configure here.