Skip to content

feat: plotting curve shapes#2609

Open
jacobrkerstetter wants to merge 18 commits intomainfrom
feat/plotting-curves
Open

feat: plotting curve shapes#2609
jacobrkerstetter wants to merge 18 commits intomainfrom
feat/plotting-curves

Conversation

@jacobrkerstetter
Copy link
Contributor

Description

  • plotting curve shapes using pyvista
  • added example of plotting surface and curve shapes

Issue linked

Closes #2605

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)

@jacobrkerstetter jacobrkerstetter self-assigned this Feb 25, 2026
@jacobrkerstetter jacobrkerstetter requested review from a team and PipKat as code owners February 25, 2026 19:12
@github-actions github-actions bot added documentation Improvements or additions to documentation enhancement New features or code improvements labels Feb 25, 2026
@github-actions github-actions bot added the testing Anything related to tests label Feb 26, 2026
@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

❌ Patch coverage is 98.75000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.62%. Comparing base (5e8e57d) to head (090f49c).

Files with missing lines Patch % Lines
src/ansys/geometry/core/shapes/curves/curve.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2609      +/-   ##
==========================================
- Coverage   94.89%   91.62%   -3.27%     
==========================================
  Files         173      173              
  Lines       14441    14513      +72     
==========================================
- Hits        13704    13298     -406     
- Misses        737     1215     +478     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

RobPasMue
RobPasMue previously approved these changes Feb 27, 2026
Copy link
Member

@RobPasMue RobPasMue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's looking good! Left some comments


@property
@graphics_required
def visualization_polydata(self) -> "pv.PolyData":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice approach as well.

BTW... maybe it'd be a good idea to share the implementation with the Sketch bjects now that I think of it. We were directly using the PyVista Circle, Ellipse classes there - but if we have a common implementation it might be for the best. What do you think?

Also, the sketches currently show up as "solid" because the inner part of the ellipse and the circle get filled with a color. This implementation you have avoids that if I am not mistaken

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoiding the fill was the reason for using the discretized implementation - I figured it would be ok for visualization because ultra precision is not necessary. I thought the "no fill" was better for visualizing but lmk your thoughts!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fully agreed! I prefer this approach way more - that's what I was trying to suggest. To share this implementation with the sketch objects impacted (Circle, Ellipse). That way we avoid having "solid" sketches (which is really confusing!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New features or code improvements testing Anything related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Curve object plotting

3 participants