Skip to content

Wishlist: export 3D render from python interface or command line

Description

When I finish a board, I usually need to export a bunch of files for the manufacturer and the client to review. An important part of this is exporting 3D renders of the board so the client can do a quick visual check for problems without having to do a mechanical check in a MCAD application (silkscreen information missing/misplaced, component placement, etc.).

What I wish is for a way to automate the export of the 3D view of the board.

I don't mind doing it through the pcbnew python interface or by calling a command on the command line (similar to kicad2step). What I find important is a way to set the following before exporting:

  • Camera position
  • Camera rotation/panning
  • Zoom factor
  • Others?

I'm not really sure what the parameters should be called since I don't have experience of setting up this kind of "scene".

This would probably be related/could help with #3690.

KiCad Version
Application: KiCad
Version: (5.99.0-369-gf5c66ed15), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.64.1 SecureTransport (LibreSSL/2.8.3) zlib/1.2.11 nghttp2/1.39.2
Platform: Mac OS X (Darwin 19.0.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    Build date: Nov 13 2019 15:20:39
    wxWidgets: 3.0.4 (wchar_t,STL containers,compatible with 2.8)
    Boost: 1.69.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.54.0
    Compiler: Clang 9.0.0 with C++ ABI 1002

Build settings:
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON
    KICAD_STDLIB_DEBUG=OFF
    KICAD_STDLIB_LIGHT_DEBUG=OFF
    KICAD_SANITIZE=OFF