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

feat: Implementation of inspect & repair geometry #1712

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

smereu
Copy link
Contributor

@smereu smereu commented Jan 31, 2025

Description

Implementation of inspect & repair geometry.

The branch needs the latest version of the protos from the API server

Face and Edges are returned from message but they are reported only as ids because attempt to retrieve them causes circular dependencies and other issues with importing modules

The script below can be used to test the code

modeler = Modeler(host="localhost", port= 50051)
design = modeler.open_file(r"C:\temp\inspsectWithManyIssues.scdocx")
results = modeler.repair_tools.inspect_geometry(bodies=[])
results[0].fix()

Issue linked

Please mention the issue number or describe the problem this pull request addresses.

Checklist

  • I have tested my changes locally.
  • I have added necessary documentation or updated existing documentation.
  • I have followed the coding style guidelines of this project.
  • I have added appropriate unit tests.
  • I have reviewed my changes before submitting this pull request.
  • I have linked the issue or issues that are solved to the PR if any.
  • I have assigned this PR to myself.
  • I have added the minimum version decorator to any new backend method implemented.
  • I have made sure that the title of my PR follows Conventional commits style (e.g. feat: extrude circle to cylinder)

Implementation of inspect & repair geometry.  Face and Edges are returned from message but they are reported only as ids because attempt to retrieve them causes circular dependencies and other issues with importing modules
@smereu smereu self-assigned this Jan 31, 2025
@smereu smereu requested a review from jrwest440 January 31, 2025 17:42
@github-actions github-actions bot added the enhancement New features or code improvements label Jan 31, 2025
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

Attention: Patch coverage is 92.30769% with 6 lines in your changes missing coverage. Please review.

Project coverage is 90.95%. Comparing base (9368e14) to head (6055fd1).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/ansys/geometry/core/tools/check_geometry.py 86.36% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1712      +/-   ##
==========================================
+ Coverage   90.94%   90.95%   +0.01%     
==========================================
  Files          91       92       +1     
  Lines        8006     8082      +76     
==========================================
+ Hits         7281     7351      +70     
- Misses        725      731       +6     

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

@smereu smereu changed the title Feat: Implementation of inspect & repair geometry feat: Implementation of inspect & repair geometry Feb 4, 2025
@smereu smereu marked this pull request as ready for review February 5, 2025 05:26
@smereu smereu requested a review from a team as a code owner February 5, 2025 05:26
@smereu
Copy link
Contributor Author

smereu commented Feb 5, 2025

If needed we can add actual face object to the result of the inspect method but for now there is no use for it so we can just report the ids

@RobPasMue
Copy link
Member

Let me pull your branch and do some local refactoring if you don't mind @smereu

smereu and others added 3 commits February 5, 2025 12:31
1) use grpc_id
2) Enum vs string
3) Make bodies optional argument for inspect and repair
4) Remove strings for some argument
5) Remove unused variable
change to adjust to core services order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or code improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants