-
Hi Marco, When I use either the Example map_points_to_cells(['A']) pointdata: Expected: map_points_to_cells(['A']) pointdata: ['B'], ['C'] I'm using vedo version: 2023.4.3.dev18 Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
marcomusy
Feb 24, 2023
Replies: 1 comment 1 reply
-
Hi @19kdc3 try:
then use from vedo import *
mesh1 = Mesh(dataurl+'icosahedron.vtk').linewidth(0.1).flat()
mesh1.pointdata["Yscalars_p"] = mesh1.points()[:, 1]
mesh1.pointdata["Zscalars_p"] = mesh1.points()[:, 2]
mesh1.celldata[ "Zscalars_c"] = mesh1.cell_centers()[:, 2]
print("-------- Before:")
mesh2 = mesh1.clone(deep=False)
print("pointdata", mesh2.pointdata.keys())
print("celldata",mesh2.celldata.keys())
print("-------- After:")
mesh2.map_points_to_cells(['Zscalars_p'], move=False)
print("pointdata",mesh2.pointdata.keys())
print("celldata",mesh2.celldata.keys()) Output:
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
marcomusy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @19kdc3 try:
then use
move=False
, e.g.:Output: