pyvista / pyvista

3D plotting and mesh analysis through a streamlined interface for the Visualization Toolkit (VTK)
https://docs.pyvista.org
MIT License
2.72k stars 500 forks source link

Pyvista about a mesh file to projection on a surface with heightmap or colored/gray scaled contour image #2817

Open ShawnjpWang opened 2 years ago

ShawnjpWang commented 2 years ago

Describe the feature you would like to be added.

Hello, everyone! This is a thought when I deal with 3D stl file, I want to change a 3d mesh which is a closed map.like a ball. And now I want the object upper surface projected on a plane,like XY plain. As I know Pyvista now has a plot function, which has a "cpos"="xy",but It seems a single point view and not a projection image. I tried to use mayavi to get the projection from top view and take a snapshot. But the windows has a lot of background. Which is not friendly for my project. Thanks for your generous time and answer!

Kindly regarded.

Links to VTK Documentation, Examples, or Class Definitions.

No response

Pseudocode or Screenshots

 Insert code here 

Or drag your screenshot here!

Code of Conduct

github-actions[bot] commented 2 years ago

Hi and welcome! Thanks for posting your first issue in the PyVista project! Someone from @pyvista/developers will chime in before too long. If your question is support related, we may transfer it to the Discussions.

chen112p commented 2 years ago

Is this what you want to do?

https://docs.pyvista.org/examples/01-filter/project-plane.html

ShawnjpWang commented 2 years ago

Dear Sir! Here is what I will Done, First I will introduce a STL file, like a bunny in example; And Then I want to project the upper surface on the XY plane;just drop the lower surface. So I want the image with countour line or fill the same height with the same color on the xy plane. Hope got some help. and the example that you supplies is a surface contour, its mesh is different from STL file, a triangulated face set like this [[[1,1,1] [2,2,2] [0.2,0.6,0.7]] [[...] [...] [...]] ........ ]

BR!
ShawnjpWang commented 2 years ago

Same the way to the URL supplies. But I just want a image of the lower colored xy plain.

ShawnjpWang commented 2 years ago

Dear Sir! Here is what I will Done, First I will introduce a STL file, like a bunny in example; And Then I want to project the upper surface on the XY plane;just drop the lower surface. So I want the image with countour line or fill the same height with the same color on the xy plane. Hope got some help. and the example that you supplies is a surface contour, its mesh is different from STL file, a triangulated face set like this [[[1,1,1] [2,2,2] [0.2,0.6,0.7]] [[...] [...] [...]] ........ ]

BR!

发件人:chen112p @.> 发送时间:2022年6月18日(星期六) 11:27 收件人:pyvista/pyvista @.> 抄 送:王晓东 @.>; Author @.> 主 题:Re: [pyvista/pyvista] Pyvista about a mesh file to projection on a surface with heightmap or colored/gray scaled contour image (Issue #2817)

Is this what you want to do? https://docs.pyvista.org/examples/01-filter/project-plane.html — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>