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

Adding append_polydata method #4489

Merged
merged 11 commits into from
Jun 8, 2023
Merged

Conversation

beroda
Copy link
Contributor

@beroda beroda commented Jun 4, 2023

Overview

This PR originates from comments #4227 (comment) and #4227 (comment).

Since #4227 replaced vtkAppendPolyDataFilter by DataSetFilters.merge in PolyDataFilters.merge to greatly improve performance and coherence with other merging operations, points ordering is altered and can cause some users to face issues.

This PR is not a roll-back of #4227 since it simply adds a PolyDataFilter.append_polydata method re-implementing vtkAppendPolyDataFilter.

A note regarding this change of behavior for 0.39.0 is also added in the documentation of PolyDataFilters.merge for users experiencing the same issues.

Details

import pyvista as pv
sp0 = pv.Sphere()
sp1 = sp0.translate((1, 0, 0))
appended = sp0.append_polydata(sp1)
appended.plot()

# Support for *args
sp2 = sp0.translate((-1, 0, 0))
appended = sp0.append_polydata(sp1, sp2)
appended.plot()

@github-actions github-actions bot added the enhancement Changes that enhance the library label Jun 4, 2023
@codecov
Copy link

codecov bot commented Jun 4, 2023

Codecov Report

Merging #4489 (dbb37b2) into main (4d75788) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #4489   +/-   ##
=======================================
  Coverage   95.65%   95.66%           
=======================================
  Files         107      107           
  Lines       21035    21048   +13     
=======================================
+ Hits        20122    20135   +13     
  Misses        913      913           

@tkoyama010
Copy link
Member

Thank you for adding this. Please hold off merging until we merge #4486 and resolve the conflict with it.

@tkoyama010 tkoyama010 marked this pull request as draft June 6, 2023 02:58
@banesullivan banesullivan marked this pull request as ready for review June 7, 2023 13:26
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.

Well done! Thank you!

@banesullivan banesullivan merged commit f3bcd50 into pyvista:main Jun 8, 2023
22 checks passed
@banesullivan banesullivan mentioned this pull request Jun 30, 2023
6 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

4 participants