Added PCB 3D image raytracing rendering from CLI, with transparent background support.
Usage string
Usage: render [--help] [--output OUTPUT_FILE] [--define-var KEY=VALUE] [--width WIDTH] [--height HEIGHT] [--side SIDE] [--background BG] [--quality QUALITY] [--preset PRESET] [--floor] [--perspective] [--zoom ZOOM] [--pan VECTOR] [--pivot PIVOT] [--rotate ANGLES] INPUT_FILE
Renders the PCB in 3D view to PNG or JPEG image
Positional arguments:
INPUT_FILE Input file
Optional arguments:
-h, --help Shows help message and exits
-o, --output Output file [nargs=0..1] [default: ""]
-D, --define-var Overrides or adds project variables, can be used multiple times to declare multiple variables.
Use in the format of '--define-var key=value' or '-D key=value' [nargs=0..1] [default: {}]
-w, --width Image width [nargs=0..1] [default: 1600]
-h, --height Image height [nargs=0..1] [default: 900]
--side Render from side. Options: top, bottom, left, right, front, back [nargs=0..1] [default: "top"]
--background Image background. Options: transparent, opaque. Default: transparent for PNG, opaque for JPEG [nargs=0..1] [default: ""]
--quality Render quality. Options: basic, high, user [nargs=0..1] [default: "basic"]
--preset Color preset. Options: follow_pcb_editor, follow_plot_settings, legacy_preset_flag, ... [nargs=0..1] [default: "follow_plot_settings"]
--floor Enables floor, shadows and post-processing, even if disabled in quality preset
--perspective Use perspective projection instead of orthogonal
--zoom Camera zoom [nargs=0..1] [default: 1]
--pan Pan camera, format 'X,Y,Z' e.g.: '3,0,0' [nargs=0..1] [default: ""]
--pivot Set pivot point relative to the board center in centimeters, format 'X,Y,Z' e.g.: '-10,2,0' [nargs=0..1] [default: ""]
--rotate Rotate board, format 'X,Y,Z' e.g.: '-45,0,45' for isometric view [nargs=0..1] [default: ""]
Isometric video
render example:
kicad-cli pcb render --floor --zoom 1.4 --rotate '-45,0,45' -o render.png video.kicad_pcb
Previously it was not possible to use kicad-cli
for rendering 3D images.