Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for thickness-based entity ID mapping in preprocessing #202

Merged
merged 4 commits into from
Nov 29, 2024

Conversation

johannesring
Copy link
Collaborator

This PR (fixing issue #197) introduces functionality to map thickness values to mesh points and adjust cell entity IDs based on the mapped thickness. The new capabilities include:

  • Thickness mapping: A map_thickness_to_mesh function to assign thickness values from a surface to mesh points.
  • Entity ID updates: An update_entity_ids_by_thickness function to adjust cell entity IDs based on average point thickness within defined ranges.
  • Command-line support: Added a --thickness-to-entity-id-mapping argument to define thickness-to-ID mappings directly via the command line.

This works when using both variable and painted thickness for the solid.

@codecov-commenter
Copy link

codecov-commenter commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 98.71795% with 1 line in your changes missing coverage. Please review.

Project coverage is 81.76%. Comparing base (84e28df) to head (0b2751e).
Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
.../automatedPreprocessing/automated_preprocessing.py 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #202      +/-   ##
==========================================
+ Coverage   81.49%   81.76%   +0.26%     
==========================================
  Files          32       32              
  Lines        3859     3937      +78     
==========================================
+ Hits         3145     3219      +74     
- Misses        714      718       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@keiyamamo
Copy link
Collaborator

It doesn’t have to be added to this PR, but I guess it would be nice to add a synthetic mesh with thickness array and add pytest for the painted surface.

@johannesring
Copy link
Collaborator Author

I have added a test for this now. It is only for variable solid thickness (not painted).

@johannesring johannesring merged commit 0074e85 into master Nov 29, 2024
5 checks passed
@johannesring johannesring deleted the johannr/thickness-entity-id-mapping branch November 29, 2024 07:57
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