How to generate a png/jpg image out of a design #1540
-
Hello Community, I am using a I wonder if there is a programmatic way to generate an enjoyable png/jpg image out of a design. Any insight? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @ansamassidd! The design.plot(screenshot="result.png") This will render a 3D view of your design and store it in a screenshot. The view will be always in Isometric mode, and that's probably something we can enhance... Another option is to use the screenshot button directly in the plotter. If you run the following: design.plot() And then change your view/zoom as desired with your mouse, you can finally click on the "Screenshot" button to save it as a PNG file as well. In the image, I framed the screenshot button in a red box for visibility. Hope all this helps! |
Beta Was this translation helpful? Give feedback.
-
Hi @RobPasMue, thanks a lot for your reactive and exhaustive response. The file that gets saved on my filesystem is exactly what I was looking for. However, I see that a |
Beta Was this translation helpful? Give feedback.
Hi @ansamassidd! The
Design
,Component
andBody
objects have the option to take a screenshot of your 3d body using PyVista's capabilities. For example:This will render a 3D view of your design and store it in a screenshot. The view will be always in Isometric mode, and that's probably something we can enhance...
Another option is to use the screenshot button directly in the plotter. If you run the following:
And then change your view/zoom as desired with your mouse, you can finally click on the "Screenshot" button to save it as a PNG file as well. In the image, I framed the screenshot button in a red box for visibility.
Hope all this he…