How to make a mesh transparent. #3958
-
Hello all! I have a cube representing the whole dimensions of a furniture piece. Inside this cube, I want to create each board of the furniture piece. What I need is to set this main cube transparent in a percentage. How can I set the color and the percentage of transparency of this main cube? I really appreciate any help you can provide. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Try something like import pyvista as pv
pl = pv.Plotter()
pl.add_mesh(pv.Cube(), opacity=0.5)
# add in other meshes
pl.show() |
Beta Was this translation helpful? Give feedback.
-
I understand that the opacity parameter is to modify how the mesh is added to the plotter, not a property of the own mesh created with the pv.Cube(). Thank you! |
Beta Was this translation helpful? Give feedback.
-
Perhaps you prefer a wire grid: |
Beta Was this translation helpful? Give feedback.
Try something like