Inkscape.org
Using Inkscape with Cutters/Plotters New Inkscape extension for easy laser cutting with LaserGRBL
  1. #1
    Nikki.Smith Nikki.Smith @Nikki.Smith
    🔥🔥*

    This extension for Inkscape speeds up preparation of laser cutting jobs if you use LaserGRBL (included free with most laser cutters).

    Pick your model of laser and material / thickness from pulldown lists, then export a complex job directly into LaserGRBL with one click. Use different coloured lines for each part of a job. eg, red lines to engrave in a single pass at 3000 mm/min @ 80% power, but blue lines cut in 3 passes at 300 mm/min @ 90% power.

    The emphasis is on it being very easy to use, with the bare minimum of settings.

    What this extension doesn't do:

    • Image / photo engraving
    • Text objects, but works if you use Inkscape's Object > Convert to path on any text first
    • Export for plotters, CNC machines or other G-code devices
    • Give full control over the G-code output, with hundreds of settings
    • Create test patterns with many different speed / power levels

    Download the latest Inkscape and LaserGRBL packages.

    How to install

    To manually install this extension, download and unpack the archive file. Copy the export_lasergrbl folder to the location listed by the Inkscape menu:

      Edit > Preferences > System: User extensions

    For Windows users this will be something like:

      %APPDATA%\inkscape\extensions

    Restart Inkscape and the new extension will be available from the menu:

      Extensions > Export > Export to LaserGRBL

    Using the extension

    The extension uses different coloured lines for each part of a job, naming them: Engrave, Inner Cut & Outer Cut colours. However these are just labels, and your job might actually use them for engraving 3 colours at different depths, or only consist of basic cutting with a single colour. In the animation below the red line & text are engraved first, then the green circles are inner cuts, and finally the blue outer cut releases the finished piece. (Inner cuts are usually done before outer, otherwise the overall piece may move when released and any further cuts would be in the wrong place).

    You can export your entire document, or make a selection of objects / groups. Then open the extension from the menu:

      Extensions > Export > Export to LaserGRBL

    Firstly choose your model of laser from the pulldown, and the material you are using. This is only a shortcut, and you can leave them blank and enter your own numbers for passes / speeds / powers.

    Click on a coloured box to change the colour to one from your Inkscape document, or alternatively you could edit your document to use the default red / mid-green / blue. If you don't need any engraving then don't use that colour, or set it to zero passes. Other colours are not exported, so for example your document could include annotations / notes that aren't sent to the laser cutter.

    Don't assume the default passes / speed / power settings are correct, as there is a lot of variation within even the same model of laser, the exact focal distance, air assist volume, between sheets of the same material and even the humidity (when cutting wood). It is always worth doing a small test cut first and tweaking the settings as required, before starting a long job. When trying a new material or thickness, you can generate test patterns in LaserGRBL to "dial in" the best settings for your particular set up.

    The total distance the laser head will move is shown, with distance per colour. A rough estimate of the time is also shown, so you can see how making more passes or using a slower cutting speed will increase the time taken.

    By default the new G-code file will be saved with the same filename & location as your Inkscape document, but with a .nc extension. You can change this if wanted, before finally clicking on "Export All". If the button is greyed out then there is nothing set to export: check the colours are correct, there is at least one pass set, and that you are exporting all the document (or the selection you intended).

    LaserGRBL should automatically start with the new job open. If it doesn't then set in your operating system. eg, for Windows: right-click on any .nc file, Open with > Choose another app select LaserGRBL and tick "Always use this app to open .nc files". You can also start LaserGRBL yourself, and load the saved G-code file.

    You've already set the number of laser passes for the job, so you don't need to do anything in LaserGRBL except click the connect icon, wait a few seconds, then click play to start cutting.

    Adding new lasers/materials to the pulldowns

    You can add (or edit) the contents of the pulldowns using LaserGRBL's Grbl > Material DB. Scroll to the bottom of the table to add a new entry:

    The extension uses a local copy of the material db file. After making any changes in LaserGRBL, you'll need to copy the file into the extension's own folder. On Windows this might be:

      %APPDATA%\LaserGRBL\UserMaterials.psh  →
      %APPDATA%\inkscape\extensions\export_lasergrbl\UserMaterials.psh

    One helpful feature is the 'Remarks' column, which lets you record notes about using a material. eg, the focal distance for cutting that thickness with your laser, or the fumes need a certain air assist setting. These notes are shown when you choose that material in the Inkscape extension.

    To make the extension pulldowns shorter, you can hide laser models that you don't own by unticking the 'Visible' column.

    Configuration

    The default settings can be altered by editing the export_lasergrbl/export_lasergrbl.ini file with any text editor. You can override the defaults when you run the extension.

    laser = Atomstack A5 PRO
    Name of your laser cutter model, or leave blank. Should be exactly as it appears in the pulldown menu

    material = Acrylic 2.8mm
    Name of the material you use most often, or leave blank. Should be exactly as it appears in the pulldown menu

    colors = #ff0000,#008000,#0000ff
    Up to 3 colours that you use in your Inkscape documents for: engraved, inner cuts & outer cuts. Each colour is a 6-digit hex code, "#rrggbb". You can see the hex code for any colour in your document by right-clicking in this extension's colour-chooser, and select 'Customize'

    maxrate = 6000
    Maximum speed (in mm/min) that your laser head can move at. This is ONLY used for estimating how long the job will take, it doesn't change the speed. For your model of laser you can copy the speed from LaserGRBL's Grbl > Grbl Configuration and scroll down to "$110 X-axis maximum rate"

    darktheme = 0
    Set to 1 if you'd like the extension window to use white text on a dark background. See Inkscape's Edit > Preferences, "Interface > Theming > Use dark theme" checkbox

    Future ideas

    Any feedback, suggestions or bug reports is VERY welcome. Below are some ideas, but I'll wait for feedback before working on any of them:

    1. Do you need to set the origin point for your laser cutter: bottom-left or top-left? Should it be an option in the .ini configuration file?
    2. Should there be an option to load the models / materials database directly from LaserGRBL, instead of the user having to make a copy of the file? So it stays up to date as the user adds new material settings
    3. Are the job time estimates reasonably accurate?
    4. Should it save colours / speed / passes inside the document so next time it is opened it is ready to cut? Or at least save in memory so the user can easily tweak their settings and export again
    5. Should there be a warning message if the document contains text or image objects?
    6. Should it directly support text objects? (without needing to use Object > Convert to path first)
    7. Should there be a warning message if the G-code save file already exists, and will be overwritten?
    8. Does it need inches/metric setting, or does everyone use mm for laser cutting? Does it work if a document is defined in px, inches, etc? (untested!)
    9. Does it work with non-RGB colours, like HSL ? What about different opacities? (untested!)
    10. Should I add an option to optimise the cutting order of the document (for shorter travel between cuts), to speed up the overall job?
  2. #2
    COD COD @COD

    So many users at Facebook and Reddit will be happy with this extension. 

    https://www.reddit.com/r/Laserengraving/

    https://www.facebook.com/groups/128006759392756

     

  3. #3
    Martin Owens Martin Owens @doctormo🌹🧀
    *

    For Inkscape 1.4 and above, extension authors can use the new "<action>" tag in the inx file to request pre-processing of the svg that is sent to the extension. This can include running "object-to-path"

    <inkscape-extension>
      ...
       <action pref="optional_pref_check">doc.all-objects-to-paths</action>
       ...
    </inkscape-extension>

     

  4. #4
    Nikki.Smith Nikki.Smith @Nikki.Smith
    doctormo

    For Inkscape 1.4 and above, extension authors can use the new "<action>" tag in the inx file to request pre-processing of the svg that is sent to the extension. This can include running "object-to-path"

    That sounds great, thanks! I'll definitely be adding that feature to convert text objects once v1.4 is released.

  5. #5
    Tribo_2.0 Tribo_2.0 @Tribo_2.0

    Eu havia experimentado em Laptop e agora experimentei no PC, em ambos acontece o mesmo, fica parado logo no começo na linha M3 S0 e não faz mais nada...

  6. #6
    Nikki.Smith Nikki.Smith @Nikki.Smith
    Tribo_2.0

    Eu havia experimentado em Laptop e agora experimentei no PC, em ambos acontece o mesmo, fica parado logo no começo na linha M3 S0 e não faz mais nada...

    Thanks for trying it! I think the problem is the very long comment (for the complex curve) the extension put in that file, confusing the laser cutter. The next release of my extension will fix this bug. Please can you try this attached version of your file to see if it works?

    Also, would you be interested in contributing a Portuguese translation for the extension? The next release will support multiple languages, and I already have English, Greek, Turkish and Ukrainian. You don't need to be a coder or expert user: it is just a short text file.

  7. #7
    Nikki.Smith Nikki.Smith @Nikki.Smith
    *

    New release v1.10 14/Oct/2024

    To manually install this extension, download and unpack the archive file. Copy the export_lasergrbl folder to the location listed by the Inkscape menu:

    Edit > Preferences > System: User extensions

    Changelog

    • now saves laser settings in the SVG file (<lasergrbl:info />), so already set next time that document is loaded
    • G-code max power was fixed as S1000, but can now be changed with new smax config option (for lasers that require it)
      documented in README
    • localization support in locale folder, with multiple language translations:
      English (US), English (Australian/British/Canadian), French, German, Greek, Italian, Spanish, Turkish, Ukrainian
      fields in window horizontally aligned: looks much better if different font sizes / word lengths
      new translations.html file
    • long remarks for a material now wrap onto multiple lines, avoids pushing window wide
      removes previous remarks if no material chosen
      BUG wasn't showing engrave-only remarks
    • new db config option to load materials database file direct from LaserGRBL (default is copy in extension folder)
      documented in README
    • max travel speed of laser was assumed to be 6000 mm/min, but can now set with new maxrate config option
      documented in README
    • renamed "Laser Model" label (shorter, consistency with LaserGRBL)
    • hides unneccessary distance / time breakdowns if nothing to export
    • now shows friendly error message if Inkscape is too old (need v1.2 or later to run)
    • included version number in window titlebar, top of source file & README
       
    • New "Troubleshooting" section in README
    • added note about Inkscape 'hanging' while extension is open
      added note about "Export" button greyed out
      added note about minimum Inkscape version
    • added tutorial to README for more than 3 colours (in a really complex job)
    • documentation has improved accessibility & responsive design for smaller screens
      new navigation widget to jump around README
      can now click to replay video of using extension
    • removed plaintext README.txt file, redundant with an HTML version
    • added notice of Creative Commons licence, CC BY-ND 4.0
    • added this changelog.html file
       
    • truncates "% path..." debugging in G-code output to 80 chars max
    • BUG very long comments (eg, from complex curves) could halt LaserGRBL job
      BUG comments now start with semi-colon character
    • skips zero-distance move G-code if last point on path == first point on next path (<0.01mm)
    • BUG improved travel distance calculation (was assuming laser returned to origin after each pass)
    • supports cloned objects when calculating distance/time, and for exporting G-code
    • BUG now correctly handles a discontinuous path (with a gap) instead of cutting it all
  8. #8
    Tribo_2.0 Tribo_2.0 @Tribo_2.0

    Olá. Desculpe-me mas só vi hoje seu post pedindo para fazer o teste, não havia recebido nenhum aviso sobre sua postagem... recebi aviso sobre a nova versão que estarei testando nos próximos dias.
    Quanto à tradução para o Português posso fazer sim, com muito prazer, apenas me oriente como.

  9. #9
    Nikki.Smith Nikki.Smith @Nikki.Smith

    @Tribo_2.0 thank you! Once you have the new version, please send me a Direct Message on this site and I'll explain how to add a new translation.

  10. #10
    Tribo_2.0 Tribo_2.0 @Tribo_2.0

    Enviei mensagem... eu acho

Inkscape Inkscape.org Inkscape Forum Using Inkscape with Cutters/Plotters New Inkscape extension for easy laser cutting with LaserGRBL