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

fix extent documentation and implementation #2827

Merged
merged 6 commits into from
Jun 23, 2022
Merged

fix extent documentation and implementation #2827

merged 6 commits into from
Jun 23, 2022

Conversation

akaszynski
Copy link
Member

Resolves #2821 by moving the implementation to pyvista.UniformGrid. It should not be a pyvista.DataSet attribute as this attribute is not applicable for all pyvista.DataSets. Just like how we do not implement dimension for a pyvista.PolyData, there's no reason to implement extent for anything except for the classes that have extent.

While other "Grid-like" classes have GetExtent and SetExtent implemented, SetExtent requires int and does not accept floats, making it poorly suited for these classes as they can return a float extent but cannot accept one.

@github-actions github-actions bot added the bug Uh-oh! Something isn't working as expected. label Jun 19, 2022
@codecov
Copy link

codecov bot commented Jun 19, 2022

Codecov Report

Merging #2827 (8865635) into main (5d6101b) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2827      +/-   ##
==========================================
+ Coverage   94.00%   94.03%   +0.02%     
==========================================
  Files          76       76              
  Lines       16390    16399       +9     
==========================================
+ Hits        15407    15420      +13     
+ Misses        983      979       -4     

pyvista/core/grid.py Outdated Show resolved Hide resolved
pyvista/core/grid.py Outdated Show resolved Hide resolved
pyvista/core/pointset.py Outdated Show resolved Hide resolved
tests/test_grid.py Outdated Show resolved Hide resolved
pyvista/core/grid.py Outdated Show resolved Hide resolved
pyvista/core/grid.py Outdated Show resolved Hide resolved
pyvista/core/pointset.py Outdated Show resolved Hide resolved
pyvista/core/grid.py Outdated Show resolved Hide resolved
pyvista/core/grid.py Outdated Show resolved Hide resolved
Co-authored-by: Andras Deak <adeak@users.noreply.github.com>
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.

LGTM, just one question out of curiosity.

pyvista/core/grid.py Outdated Show resolved Hide resolved
@tkoyama010 tkoyama010 merged commit 1bd5689 into main Jun 23, 2022
@tkoyama010 tkoyama010 deleted the fix/extent branch June 23, 2022 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Uh-oh! Something isn't working as expected.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent behavior of property extent for different data structures
4 participants