How can I export or download the image of the front side and backside of 3D model

Currently, I have a model with 2 sides (Backside and Front side).
The API support for download an image by using 2 step below:

  1. Reset the position of the camera:

    let camera = api.scene.camera.get().data;
    let position = { x: 0, y: -60, z: 0};
    let target = { x: 0, y: 0, z: 0 };
    camera.position = position;
    camera.target = target;
    api.scene.camera.updateAsync(camera, { duration: 1500});

  2. Take a screenshot:

    api.scene.getScreenshot()

I want to export or download 2 images of these sides, but I don’t want to reset the position of the camera, so anyone has any solution?

Hi - you didn’t categorize your post… Is this related to ShapeDriver, perhaps?
-wim

yes, is it. I just updated it

The getScreenshot() function of the API only works if the viewport is visible.

Depending on what you need, you could instead use the Make2D component and export several line drawings from Grasshopper (as DXF or as bitmaps if you use Squid). But if you need a rendered view, there is not other way at the moment.