I think LaserCAD's crumby file import capabilities have been a source of frustration for pretty much everyone. It's the number one source of problems and questions I get after laser trainees try to start using it.
There are two options that I know to work:
- Adobe Illustrator (
.ai) works as long as you save it for a very old version of Illustrator. I used version 3, which is ancient. This usually works for me but often subtly distorts or omits parts of the artwork. This isn't viable for most people since they don't have Illustrator anyway.
- AutoCAD DXF (
.dxf) works pretty well, but only the older R13 version. There are certain capabilities of newer dxf files that LaserCAD can't interpret. In particular, splines seem to be the thing that's not supported. Unfortunately most software that exports DXF includes splines, with no option to approximate them with straight lines.
In my quest for a better workflow that is more accessible to all members, I found svgToDxf which is a thin shell script that uses Inkscape in headless mode to convert from svg➔eps, and then uses pstoedit to convert from eps➔dxf. Critically, pstoedit has options to dumb down the resulting DXF, including using straight lines to approximate splines.
The command I used was:
$ pstoedit -dt -f 'dxf:-polyaslines -mm' ./Layer1.eps ./Layer1.dxf
The DXF files it produces work nicely in LaserCAD, so there's promise that this could be wrapped in an applet that runs on the laser PC, or made into a web service for converting files.
In the name of science, I tried to also produce a DXF with splines:
$ pstoedit -dt -f 'dxf_s:-mm' ./Layer1.eps ./Layer1-splines.dxf
Sure enough, this one crashed LaserCAD.
Other file prep
This doesn't quite mean you can throw any SVG and have it cut very well. For example I used this file for my tests and while it looks like it would simple to laser, it needed some prep:
- Strokes that have significant width need to be expanded into a shape. Since the paths are cut, they should just be invisible and the artwork should be represented entirely by filled objects
- Similarly, text needs to be converted to outlines as well (not an issue for this file, though)
- Overlapping objects need to be "unioned" together so that a single complex outline is cut, not a bunch of simple overlapping shapes.
Try it out and see if you can reproduce my results. Or if you have better workflow ideas you can post those.
If someone knows Windows better than me, maybe you can wrap
pstoedit in a GUI applet of some sort.