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

Expose BandedPolyDataContourFilter #3606

Merged
merged 4 commits into from
Nov 18, 2022
Merged

Expose BandedPolyDataContourFilter #3606

merged 4 commits into from
Nov 18, 2022

Conversation

akaszynski
Copy link
Member

Expose vtk.vtkBandedPolyDataContourFilter. It's similar to vtkContourFilter, but different enough to necessate creating a new method as it's only applicable to PolyData.

Example:

Extract the surface from the uniform grid dataset and plot its contours
alongside the output from the banded contour filter.

import pyvista as pv
from pyvista import examples
surf = examples.load_uniform().extract_surface()
output, edges = surf.contour_banded(5, rng=[200, 500])
pl = pv.Plotter()
_ = pl.add_mesh(edges, line_width=5, render_lines_as_tubes=True, color='k')
_ = pl.add_mesh(surf, opacity=0.3, show_scalar_bar=False)
_ = pl.add_mesh(output)
pl.show()

tmp

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

codecov bot commented Nov 15, 2022

Codecov Report

Merging #3606 (37b5a35) into main (91eff74) will decrease coverage by 0.00%.
The diff coverage is 93.33%.

@@            Coverage Diff             @@
##             main    #3606      +/-   ##
==========================================
- Coverage   95.17%   95.17%   -0.01%     
==========================================
  Files          83       83              
  Lines       18579    18609      +30     
==========================================
+ Hits        17683    17711      +28     
- Misses        896      898       +2     

Copy link
Member

@banesullivan banesullivan left a comment

Choose a reason for hiding this comment

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

Indeed a bit different from the standard contour filter so happy to have this as a separate method thought I would've loved to have an return_edges argument do this..

@akaszynski akaszynski merged commit 654ad10 into main Nov 18, 2022
@akaszynski akaszynski deleted the feat/banded_filter branch November 18, 2022 00:42
@banesullivan banesullivan mentioned this pull request Feb 1, 2023
5 tasks
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

2 participants