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 split sharp edges to theme #2575

Merged
merged 7 commits into from
May 15, 2022
Merged

Conversation

akaszynski
Copy link
Member

@akaszynski akaszynski commented May 9, 2022

Add in the ability to set splitting of sharp edges in the global theme. This makes it easier to set default edge splitting for plots with sharp edges (like CAD-like geometry).

>>> import pyvista
>>> pyvista.global_theme.sharp_edges_feature_angle = 45
>>> pyvista.global_theme.split_sharp_edges = True
>>> pyvista.global_theme.split_sharp_edges
True

Bonus (there always is)

  • Add a fixture to reset the global theme so it's not modified during docstring testing.
  • Remove doctest:+SKIP within theme.py as it is no longer necessary due to proper theme resetting.

@github-actions github-actions bot added the enhancement Changes that enhance the library label May 9, 2022
@codecov
Copy link

codecov bot commented May 9, 2022

Codecov Report

Merging #2575 (93e1b46) into main (a0979f7) will increase coverage by 0.06%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2575      +/-   ##
==========================================
+ Coverage   93.69%   93.75%   +0.06%     
==========================================
  Files          75       75              
  Lines       16159    16180      +21     
==========================================
+ Hits        15140    15170      +30     
+ Misses       1019     1010       -9     

pyvista/themes.py Outdated Show resolved Hide resolved
pyvista/themes.py Outdated Show resolved Hide resolved
Copy link
Member

@adeak adeak left a comment

Choose a reason for hiding this comment

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

Great idea adding the fixture, lot more doctests are always awesome. Two minor suggestions but this is good as is too. Thanks.

pyvista/conftest.py Show resolved Hide resolved
pyvista/themes.py Outdated Show resolved Hide resolved
akaszynski and others added 2 commits May 15, 2022 14:23
Co-authored-by: Andras Deak <adeak@users.noreply.github.com>
@akaszynski akaszynski enabled auto-merge (squash) May 15, 2022 20:41
@akaszynski akaszynski disabled auto-merge May 15, 2022 23:01
@akaszynski akaszynski enabled auto-merge (squash) May 15, 2022 23:02
@akaszynski akaszynski merged commit 7995486 into main May 15, 2022
@akaszynski akaszynski deleted the feat/add_split_sharp_to_theme branch May 15, 2022 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Changes that enhance the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants