Trouble with SVG import from KiCad's own generated SVG

In the attached project, I exported both F.Cu and Edge.Cuts into an SVG file and then re-imported it. It turns out this works as expected when the outline is a rectangle, but not when it is a polygon. For a polygon, KiCad draws a bigger filled rectangular thing around it. When I enter the group and move a corner of that filled area, I can see that both the copper and outline are under it.

I made this test project after seeing it first in the MP2-DFN and MP2-ESC projects Both these projects have already been in production, so apparently the Gerbers are OK when a polygon is used for the outline.

I am thinking about making a bug report for this, but I am having trouble with verifying this on V7.99. (It’s stuck on the version: Date: Jun 12 2023 16:03:36)

Is this still present in a current nightly when Edge.Cuts is a Polygon? (12.1 KB)

Application: KiCad PCB Editor x86_64 on x86_64

Version: 7.0.9-7.0.9~ubuntu20.04.1, release build

	wxWidgets 3.2.2
	FreeType 2.10.1
	HarfBuzz 6.0.0
	FontConfig 2.13.1
	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 Mint 20.3, 64 bit, Little endian, wxGTK, xfce, x11

Build Info:
	Date: Nov  8 2023 19:01:27
	wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
	Boost: 1.71.0
	OCC: 7.5.2
	Curl: 7.88.1
	ngspice: 38
	Compiler: GCC 9.4.0 with C++ ABI 1013

Build settings:

Is this still present in a current nightly when Edge.Cuts is a Polygon?

No, the edge.cuts is exported/reimported correctly. (checked with todays - 02.12.2023 - v7.99 nightly Version: 7.99.0-3795-g4268ffec77, release build, on WIn10)

But I see another difference to your picture: the pad-shapes are reimported as unfilled shapes (see picture). I don’t know if this is expected or not.

I have played a little bit more (with v7.99) with this topic and was a bit surprised that the SVG-import depends on the destination layer in pcbnew:

  • importing into the edge.cuts layer gives my image above - with correct rectangle + polygone, but with empty copper pads
  • importing into any other layer gives correctly filled pads, but the original rectangle/polygone outline is imported as filled shape (which was part of issue of paul).

I think this is not correct, so it’s worth a bugreport.

I can’t run / test with V7.99 at the moment, so I am not going to make a bug report for it in the near future myself.

I’m still not familiar with SVG-files, but have opened a bugreport: SVG export and reimport: different behaviour depending on destination layer (#16324) · Issues · KiCad / KiCad Source Code / kicad · GitLab

1 Like

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