Skip to content

feat: use service colors in plotter (upon request)#1376

Merged
RobPasMue merged 27 commits intomainfrom
feat/use-body-colors-in-plotter
Oct 4, 2024
Merged

feat: use service colors in plotter (upon request)#1376
RobPasMue merged 27 commits intomainfrom
feat/use-body-colors-in-plotter

Conversation

@RobPasMue
Copy link
Member

@RobPasMue RobPasMue commented Aug 27, 2024

Description

Enabling the usage of service colors upon request. Including a new library global variable called ansys.geometry.core.USE_SERVICE_COLORS. If set to True the plotter will make use of the service-defined colors. This can make large components to be plotted very slowly since it will require interaction with the service. By default, SC green will be used, just like until now.

We are also exposing these capabilities now via the plot(...) methods. Users won't have to specifically set the global variable if they just want to check it once.

Documentation and testing has been added.

Issue linked

Closes #433

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)

@RobPasMue RobPasMue self-assigned this Aug 27, 2024
@github-actions github-actions bot added the enhancement New features or code improvements label Aug 27, 2024
@codecov
Copy link

codecov bot commented Aug 27, 2024

Codecov Report

Attention: Patch coverage is 91.30435% with 4 lines in your changes missing coverage. Please review.

Project coverage is 91.79%. Comparing base (6e25667) to head (bbb937e).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/ansys/geometry/core/designer/body.py 75.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1376      +/-   ##
==========================================
- Coverage   91.81%   91.79%   -0.02%     
==========================================
  Files          86       86              
  Lines        6880     6912      +32     
==========================================
+ Hits         6317     6345      +28     
- Misses        563      567       +4     

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

@RobPasMue RobPasMue marked this pull request as ready for review August 28, 2024 14:25
@RobPasMue RobPasMue requested review from a team and PipKat as code owners August 28, 2024 14:25
@RobPasMue
Copy link
Member Author

Hi @PipKat - would you be able to review at least the mystnb file that contains the example I've worked on? Much appreciated!!

@RobPasMue
Copy link
Member Author

This PR is expected to fail certain tests (at least until the new server version is available with the "null" return for colors whenever it is not assigned.

@RobPasMue RobPasMue linked an issue Aug 29, 2024 that may be closed by this pull request
@RobPasMue
Copy link
Member Author

I can't believe we are about to close this 😍

@RobPasMue RobPasMue merged commit 4ab4835 into main Oct 4, 2024
@RobPasMue RobPasMue deleted the feat/use-body-colors-in-plotter branch October 4, 2024 10:37
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.

Add color support on the Linux service PLOTTING: color alignment with service(Discovery,SpaceClaim)

2 participants