Hide menu
Screenshot generation

Generation of 3D model screenshots with CAD Exchanger Command Line Interface (CLI) is similar to the conversion between formats. Screenshots can be saved in PNG, JPG and BMP formats.

./ExchangerConv -i ../models/kk35-7.stp -e kk35-7.png -s settings.ini
Warning
Screenshot generation is not supported on macOS. Please contact us at info@.nosp@m.cade.nosp@m.xchan.nosp@m.ger..nosp@m.com if you are interested in such functionality.

Prerequisites

Screenshot generation uses OpenGL API for image rendering and requires graphic driver with OpenGL 2.1 (or higher) support. For better performance the latest graphical driver should be installed on the machine.

Software rendering via Mesa 3D Graphics Library can be used for screenshot generation on machines with OpenGL 1.x only support (e.g. Windows/Linux server with default graphical driver).

To generate screenshots on Linux machine additional packages should be installed. Please refer to guide on how to setup environment on Linux machine.

Configuring image output

Settings file is used to customize screenshot output. All settings related to the image generation should be placed in [%7B7299022c-2011-4b30-962c-caaa39cbcb05%7D] section:

# settings.ini
[%7B7299022c-2011-4b30-962c-caaa39cbcb05%7D]
width=512
height=512
bgcolor=#ABCDEF
cameraprojection=perspective
displaymode=shaded

For more details about supported settings please refer to the graphical formats settings section.

Basic parameters

  1. width - image width in pixels.
    height - image height in pixels.

    Note
    Line width for "Shaded with boundaries" display mode is automatically adjusted to look consistent for different image sizes.
    width=200, height=200
    width=450, height=450
  2. bgcolor - background color.

    transparent
    black
    #ABCDEF
  3. cameraprojection - camera projection mode.

    isometric
    perspective
  4. cameraposition - camera position

    front
    left
    zpos
    xposynegzpos
  5. representation - representation to display.

    brep
    finepoly
    mediumpoly
    coarsepoly
  6. displaymode - display mode used for rendering.

    wireframe
    shaded
    shadedwithboundaries