Can pcbnew export SVG in metric units?

Hi, newbie here. I hope this is the right place to ask this.
I made pcbnew export Edge.Cuts and a few other layers to SVG, hoping to use it as input for a laser-cutter for making a protective plate. To my surprise, when I open it in Inkscape, I see small errors everywhere that make it hard to do manual adjustments needed for the plate.

It seems the problem is that KiCad is exporting to SVG in inches: the file sets a viewBox with 1 pixel per mil on an A4 sheet (not sure “pixel” is the right word here, but I mean whatever unit SVG drawing commands use). I have pcbnew set to use mm in the Preferences dialog. I’ve tried File > Plot, but that also exports in inches. Is there a way to have pcbnew export something that works better in mm, say one that sets a viewBox with 1 pixel per mm? I’m using KiCad 5.99.0+really5.1.10+dfsg1-1 on Ubuntu GNU/Linux.

Below are the first lines of an .SVG generated with KiCad, by using: PCB Editor / File / Export / AVG….
I exported the whole A4 sheet which is 297 by 210mm and the viewbox is also set to these coordinates.

<?xml version="1.0" standalone="no"?>
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> 
<svg
  xmlns:svg="http://www.w3.org/2000/svg"
  xmlns="http://www.w3.org/2000/svg"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  version="1.1"
  width="29.700220cm" height="21.000720cm" viewBox="0 0 297002200 210007200">
<title>SVG Picture created as mumar_base_stm32-F_Cu.svg date 2022/01/26 16:17:23 </title>
  <desc>Picture generated by PCBNEW </desc>
<g style="fill:#000000; fill-opacity:1.000000;stroke:#000000; stroke-opacity:1.000000;
stroke-linecap:round; stroke-linejoin:round;"
 transform="translate(0 0) scale(1 1)">
</g>
<g style="fill:#000000; fill-opacity:0.0; 

Also, the big numbers in the viewbox coordinates: 297002200 and 210007200 are a strong indication that KiCad uses nanometers, which is the native resolution in which KiCad does everything.

I am using the latest stable version of KiCad (See below).

Your version number seems very odd. What is that “really 5.1.10” part?

Application: KiCad PCB Editor

Version: 6.0.1-79c1e3a40b~116~ubuntu20.04.1, release build

Libraries:
	wxWidgets 3.0.4
	libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3

Platform: Linux 5.13.0-27-generic x86_64, 64 bit, Little endian, wxGTK, xfce, x11

Build Info:
	Date: Jan 15 2022 20:26:22
	wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.71.0
	OCC: 7.5.2
	Curl: 7.81.0
	ngspice: 31
	Compiler: GCC 9.3.0 with C++ ABI 1013

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON

That’s what I’d like to see! I get the following instead. I did Pcbnew / File / Export / SVG (S)…, select SVG page size “current paper size”, select paging “all layers in a single file”, and hit Export. (I’m translating from Japanese menus, so the wording may be different.)
Just to make sure, “PCB Editor” is pcbnew, right? I don’t know about the version number, that’s just what dpkg (and the Help / About button on pcbnew) shows. I see, it might just be a version problem. Let me try out a different version and see.

    <?xml version="1.0" standalone="no"?>
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> 
<svg
  xmlns:svg="http://www.w3.org/2000/svg"
  xmlns="http://www.w3.org/2000/svg"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  version="1.1"
  width="29.700220cm" height="21.000720cm" viewBox="0 0 116930 82680">
<title>SVG Picture created as my-petite-split-brd.svg date 2022/01/27 00:24:24 </title>
  <desc>Picture generated by PCBNEW </desc>
<g style="fill:#000000; fill-opacity:1;stroke:#000000; stroke-opacity:1;
stroke-linecap:round; stroke-linejoin:round;"
 transform="translate(0 0) scale(1 1)">
</g>

Yes, It has been “rebranded” to a more generic name.
Apperenlty there were repeated questions from beginners about what “Pcbnew” meant.

In KiCad V6.0.1 the .SVG export window looks like (In english, and on Linux Mint):

Some people have quite good reasons for staying with an older stable version (For example if it’s for work), but your version suggests some lust for new stuff.
A stable version V6.0 was released around christmas, and has already been bumped to V6.0.1 with a few bug fixes. You can find installation instructions on the KiCad website.

Aha! Updating to 6.0.1 solved the problem, now everything is done cleanly in nanometers. And this is just a hobby project, so being on the cutting edge is no problem for me. Thank you so much paulvdh!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.