yy502 / inkscape-laserpecker

An Inkscape Gcode generator extension for LaserPecker.
48 stars 18 forks source link

LaserPecker Extension for Inkscape

This is a Gcode generator extension for Inkscape, that will generate Gcode compatible with LaserPecker engravers. The LaserPecker App already has a built-in Gcode converter with capability of line-filling, which is pretty easy to use. Please consider using the built-in Gcode mode first.

LaserPecker

LaserPecker is a brand of affordable and portable consumer level laser engravers. For more details, visit The Unofficial Wiki for LaserPecker.

Compatibility

Before generating Gcode for LP, please select the correct model and firmware number.

Installation

1) Install Inkscape v0.92 or newer and watch this video on how to download a file from GitHub. 2) Depending on your Inkscape version and operating system, download laserpecker.inx and laserpecker.py from extension/<your_inkscape_version>/ directory into...

Settings and Limitations

Image to Gcode

Click to watch video tutorial (using Inkscape 0.92 here, v1.x looks slightly different):

1) Launch Inkscape. 2) Import an image, preferably a black and white image onto the blank canvas. 3) Select the image, then "Path" > "Trace Bitmap" 4) Use the following optimal settings (using Inkscape 0.92 here, v1.x is slightly different):

Filling Your Shapes With Lines

You may have noticed that only the edges of your graphic are converted to paths, and therefore to Gcode. While this is desireable in some situations, like for cutting shapes out of your materials, we sometimes want to fill the shapes so they look like the original image, not just a hollow trace.

Here is how:

There are three options you can/should tweak:

It is that easy! After filling your shape, generate Gcode as you would and optionally inspect your Gcode (read the next section) before engraving.

Convert B&W Images to Single Line Sketches

Inkscape 0.92 users

1) follow this guide (TL;DR part) to compile & install autotrace (linux-only I'm afraid). 2) Use the single-line command shown in the link above to convert your bitmap (png) image to svg 3) Use this Gcode extension to generate Gcode for LaserPecker.

Inkscape 1.x users

see https://lp.systemd.one/how-to/inkscape-1-x-converting-bw-images-to-single-line-sketches-for-gcode-engraving/

Optional: Inspect Generated Gcode

Click to watch video tutorial:

1) Open up the generated file with a text editor 2) Select all texts and copy 3) Open NC Viewer 4) Clear the sample Gcode and paste your Gcode in 5) Click the blue "Plot" button to visualise your Gcode.

Sending Gcode Files to App

Once the .txt Gcode files are generated...

Finally, your Gcode file is available in LP App under Examples > G-code tab.

Sample Images

I have included a few sample images for you to test convert to Gcode and engrave with LaserPecker. The reason why I did not include any sample Gcode is because you will need to choose the best settings (power,speed) for your material at the point of generation.

Helper Files

L1/Pro only: In testing directory, I have created some Gcode files to help you quickly test and find out the optimal power+speed settings for cutting or engraving your target material.

In resources directory, there are several sets of grid files, aiming to help you position your object under the laser. Each set has the following files:

Experimental Extension for L1

This extension helps you to utilise absolute Gcode coordinates and engrave over 200mm x 140mm area with L1 model. However, the oversize engraving result has been inconsistent around the far ends. In my opinion it's not worth the hassle, so I have stopped working on this. There's a chance that LaserPecker will officially unlock this capability, if they manage to reduce distortion via their App.

Credit

This extension is based on J Tech Laser Tool Plugin V 2_2 for Inkscape for laser engraving and cutting.

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA