SVG gerber import: Paths import as infinitely thin lines

Issue #229 new
J.R. Mitchell created an issue

With the exception of circles, every SVG object I have tried to import has imported as an infinitely thin outline instead of a filled area. I used the shell command "import_svg AdapterV2-F.Cu_bigPad-stroke.svg -type gerber" When Isolation Routing, this results in it generating geometry for both sides of the outline, instead of just the outside.

The attached file and /tests/svg/drawing.svg both show the issue

Comments (2)

  1. Juan Pablo Caram repo owner

    Now that I look at the code, it seems that the -type gerber options only changes the type of object that is created, but it does not interpret the geometry differently.

    In the meantime, look at the exteriors shell command. That will solve the problem of getting isolation inside the paths.

  2. Marius Stanciu

    Solved this one in the latest build of my fork of FlatCAM. Actually the issue with not generating Gerber object was because the self.solid_geometry created by the import_svg() function from camlib.py was a a list of lists and singular elements. Once that list is flattened and joined with cascaded_union, the SVG's imported as Gerber load as expected.

  3. Log in to comment