`merge` filter does not preserve multi-component data
See original GitHub issueDescribe the bug, what’s wrong, and what you expect:
merge
filter does not preserve vectors data.
To Reproduce
Please include a code snippet to reproduce the bug in the block below:
import pyvista
from pyvista import examples
filename = examples.download_cavity(load=False)
reader = pyvista.get_reader(filename)
reader.set_active_time_value(2.5)
mesh = reader.read()
internal_mesh = mesh['internalMesh']
boundary_mesh = mesh['boundary']['movingWall']
# Using vtk==9.1.0, the point_data is mostly the same on both meshes
# Arbitrarily change the boundary mesh
boundary_mesh.point_data["U"] = 10
merged_mesh = internal_mesh.merge(boundary_mesh, main_has_priority=False)
print(internal_mesh.point_data)
print(boundary_mesh.point_data)
print(merged_mesh.point_data)
gives
pyvista DataSetAttributes
Association : POINT
Active Scalars : p
Active Vectors : U
Active Texture : None
Active Normals : None
Contains arrays :
U float32 (882, 3) VECTORS
p float32 (882,) SCALARS
pyvista DataSetAttributes
Association : POINT
Active Scalars : p
Active Vectors : U
Active Texture : None
Active Normals : None
Contains arrays :
U float64 (42,) VECTORS
p float32 (42,) SCALARS
pyvista DataSetAttributes
Association : POINT
Active Scalars : p
Active Vectors : None
Active Texture : None
Active Normals : None
Contains arrays :
p float32 (882,) SCALARS
Screenshots N/A
System Information: Please run the following code wherever you are experiencing the bug and paste the output below. This report helps us track down bugs and it is critical to addressing your bug:
# Get system info
import pyvista as pv
print(pv.Report())
--------------------------------------------------------------------------------
pyvista : 0.34.dev0
vtk : 9.1.0
numpy : 1.22.2
imageio : 2.14.1
appdirs : 1.4.4
scooby : 0.5.11
matplotlib : 3.5.1
IPython : 7.31.1
colorcet : 3.0.0
cmocean : 2.0
ipyvtklink : 0.2.2
itkwidgets : 0.32.1
tqdm : 4.62.3
meshio : 5.3.0
Noted in https://github.com/pyvista/pyvista/discussions/2126
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Mail merge filtering problem - Microsoft Community
I am trying to get a consistent result from filtering records during a mail merge from an Excel data file. It has worked...
Read more >How to filter all related data from merged cells in Excel?
To solve this job, you need to do following operations step by step. 1. Copy your merged cells data to other blank column...
Read more >Filter not working for merged cell in Excel - YouTube
FB: https://www.facebook.com/shaakzscatiav5forumOne day training on any subject taught on my channel for 100$, Training only on weekends IST ...
Read more >Unable to Filter Data after merging Cells? Then try this tips!
Hello, In this short video I have shown you how to filter data after merging cells. This is really simple and really helpful...
Read more >Clampfit Batch Analysis User Guide | Molecular Devices
Keep the window open while you use Clampfit Batch Analysis to move to different locations in the client and copy data to the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This doesn’t work, which means that it is multi-component data that doesn’t get copied. This is weird to me.
I wonder also if we could de-activate the VECTORS data then re-activate later. I’m not sure if it is limited to the active vectors yet.
I can see some cases where just copying over data may not be possible. For example, copying over NORMALS may not be correct. I can’t come up with a reason why VECTORS would be affected.