LaserGRBL icon indicating copy to clipboard operation
LaserGRBL copied to clipboard

SVGs from FlatCAM are imported incorrectly

Open positron96 opened this issue 4 years ago • 4 comments

Hello! I'm trying to laser burn a PCB layout prepared in FlatCAM, exported to SVG and imported into LaserGRBL (v3.7.1). While the PCB starts at 0,0 in FlatCAM (and in Inkscape if I open the SVG in it), in LaserGrbl it is offsetted by random amount along Y axis. See pictures:

flatcam: image

inkscape: VirtualBox_ubox_19_09_2020_21_56_28

LaserGrbl v3.7.1 image

Could you dig into the issue?

I'm also attaching the SVG, saved as TXT Gerber_BottomLayer.GBL_0.1000_iso_svg.svg.txt

positron96 avatar Sep 19 '20 15:09 positron96

I would bet that the scale operation it's the one causing troubles...

Can you try to do some operation in inkscape, like a simple ungroup, save the file and try it out?

BeatSlayer avatar Sep 21 '20 19:09 BeatSlayer

image

The issue is with the viewbox. If I copy-paste the drawing to a new inkscape file, and shape out paper size to drawing size all is handled well by lasergrbl.

image

Look like that LaserGRBL is not able to handle viewbox correctly. It's hard to fix because SVG routine is not a code written by me but copied from a public project and I have no idea of how to put hands on it.

arkypita avatar Sep 24 '20 10:09 arkypita

Thank you for info! Anyway, I've figured out that FlatCAM has a GRBL_Laser g-code preprocessor that eliminates the need for LaserGRBL's ability to import SVGs.

positron96 avatar Sep 24 '20 11:09 positron96

Good

arkypita avatar Sep 24 '20 12:09 arkypita