PcbDrawOptions parameters

  • bottom : [boolean] (default: false) Render the bottom side of the board (default is top side).

  • format : [string] (default: 'svg') (choices: “svg”, “png”, “jpg”, “bmp”) Output format. Only used if no output is specified.

  • mirror : [boolean] (default: false) Mirror the board.

  • output : [string] (default: '%f-%i%I%v.%x') Name for the generated file. Affected by global options.

  • show_components : [list(string) | string] (default: 'none') (choices: “none”, “all”) (also accepts any string) List of components to draw, can be also a string for none or all. The default is none.
    There two ways of using this option, please consult the add_to_variant option.
    You can use _kf(FILTER) as an element in the list to get all the components that pass the filter.
    You can even use _kf(FILTER1;FILTER2) to concatenate filters.

  • style : [PcbDrawStyle parameters] [string | dict] (default: empty dict, default values used) PCB style (colors). An internal name, the name of a JSON file or the style options.

  • add_to_variant : [boolean] (default: true) The show_components list is added to the list of components indicated by the variant (fitted and not excluded).
    This is the old behavior, but isn’t intuitive because the show_components meaning changes when a variant is used. In this mode you should avoid using show_components and variants.
    To get a more coherent behavior disable this option, and none will always be none.
    Also all will be what the variant says.

  • dnf_filter : [string | list(string)] (default: '_null') Name of the filter to mark components as not fitted. Is a short-cut to use for simple cases where a variant is an overkill.
    Can be used to fine-tune a variant for a particular output that needs extra filtering done before the variant.

  • dpi : [number] (default: 300) (range: 10 to 1200) Dots per inch (resolution) of the generated image.

  • exclude_filter : [string | list(string)] (default: '_null') Name of the filter to exclude components from processing. Is a short-cut to use for simple cases where a variant is an overkill.
    Can be used to fine-tune a variant for a particular output that needs extra filtering done before the variant.

  • highlight : [list(string)] (default: []) List of components to highlight. Filter expansion is also allowed here, see show_components.

  • libs : [list(string)] (default: ['KiCAD-base']) List of libraries.

  • margin : [PcbMargin parameters] [number | dict] (default: 0) Margin around the generated image [mm]. Using a number the margin is the same in the four directions.

  • no_drillholes : [boolean] (default: false) Do not make holes transparent.

  • outline_width : [number] (default: 0.15) (range: 0 to 10) Width of the trace to draw the PCB border [mm]. Note this also affects the drill holes.

  • placeholder : [boolean] (default: false) Show placeholder for missing components.

  • pre_transform : [string | list(string)] (default: '_null') Name of the filter to transform fields before applying other filters. Is a short-cut to use for simple cases where a variant is an overkill.
    Can be used to fine-tune a variant for a particular output that needs extra filtering done before the variant.

  • remap : [string_dict | string] (default: 'None') (DEPRECATED) Replacements for PCB references using specified components (lib:component). Use remap_components instead.

  • remap_components : [PcbDrawRemapComponents parameters] [list(dict)] (default: []) Replacements for PCB references using specified components. Replaces remap with type check.

  • resistor_flip : [string | list(string)] (default: '') [comma separated] List of resistors to flip its bands.

  • resistor_remap : [PcbDrawResistorRemap parameters] [list(dict)] (default: []) List of resistors to be remapped. You can change the value of the resistors here.

  • show_solderpaste : [boolean] (default: true) Show the solder paste layers.

  • size_detection : [string] (default: 'kicad_edge') (choices: “kicad_edge”, “kicad_all”, “svg_paths”) Method used to detect the size of the resulting image. The kicad_edge method uses the size of the board as reported by KiCad, components that extend beyond the PCB limit will be cropped. You can manually adjust the margins to make them visible.
    The kicad_all method uses the whole size reported by KiCad. Usually includes extra space.
    The svg_paths uses all visible drawings in the image. To use this method you must install the numpy Python module (may not be available in docker images).

  • svg_precision : [number] (default: 4) (range: 3 to 6) Scale factor used to represent 1 mm in the SVG (KiCad 6). The value is how much zeros has the multiplier (1 mm = 10 power svg_precision units).
    Note that for an A4 paper Firefox 91 and Chrome 105 can’t handle more than 5.

  • variant : [string] (default: '') Board variant to apply.

  • vcuts : [boolean] (default: false) Render V-CUTS on the vcuts_layer layer.

  • vcuts_layer : [string] (default: 'Cmts.User') Layer to render the V-CUTS, only used when vcuts is enabled. Note that any other content from this layer will be included.

  • warnings : [string] (default: 'visible') (choices: “visible”, “all”, “none”) Using visible only the warnings about components in the visible side are generated.

Used dicts