Inkscape



Inkscape is a Free and Open Source vector drawing program oriented towards the creation of SVG (scalable vector graphics). It can export to DXF for use in other CAD/CAM software, or directly to G-code using the Gcodetools extension. It has a broad variety of import and export formats, so is useful to have for conversion, even if one doesn't use it to draw. See pstoedit at Software: Conversion Programs for further conversion tools.

Be sure to read the section on Bézier Curves at the top of the CAD page.

Download
Inkscape is freely available for Windows, OSX, and Linux from inkscape.org.

Available from the Microsoft Store: https://www.microsoft.com/en-us/p/inkscape/9pd9bhglfc7h?activetab=pivot:overviewtab

Configuration
The only configuration issue documented thus far is reconciling the units used in InkScape with those expected by MakerCAM as noted here and in the discussion "Inkscape to makercam dims off? - Change the preferences!".

Usage Considerations
The default is to include stroke width in object dimensions. It is more straight-forward if such is not included. One can either work w/ objects which have no stroke, but fill only, or change the preference:

Edit | Preferences --- under Tools choose the radio button to use Geometric bounding box (this excludes stroke width from the size, making calculation, placement and sizing easier)

Combining overlapping objects
In order to see how the files are actually constructed and will be imported by your CAM tool, do View | Display Mode | Outline.

As that view indicates, type, set as type will not be usable, it must be converted to a path using appropriate commands. To combine over-lapping objects (this includes text in script fonts):


 * Path | Object to Path C (that includes a )
 * Path | Union

You can verify what your CAM program will see using:


 * View | Display mode | Outline

That's an important view for vector work --- usually one shifts in and out of it constantly.

Ungroup and rework as needed.

Converting Text to Objects
This is necessary to import into Carbide Create and many other tasks, most notably the Path commands noted below.


 * View | Display Mode | Outline (this gets one a view which shows objects more or less as CC will import them
 * Select all text objects which one wishes to convert (shift-click on each in turn after the first or click drag-select to do multiples)
 * Path | Object to Path --- this should convert most other objects as well (arguably one could just select all and then do this)

Path commands
The Path commands are even more important and one needs to understand all of the options:


 * Union
 * Difference
 * Intersection
 * Exclusion
 * Division
 * Cut path

work and how stacking order interplays w/ them in order to accomplish anything non-trivial w/o going to a lot of unnecessary work.

Closing Paths
Instructions for doing manually: https://community.carbide3d.com/t/only-curves-show-up-when-opening-svg/13093/10

Script: NK_chain_paths.zip

Scaling Factor for SVG Files
SVG files will include a statement which notes how many internal (file) units there are per inch. Different programs use different numbers --- most programs on import will ignore this value and instead directly map to their own (possibly different) value. Values for some programs:


 * 72 --- Adobe Illustrator
 * 90 --- Inkscape --- note that Inkscape will leave this out if opening a .pdf or other file, resulting in the wrong dimensions.
 * 300 --- Affinity Serif Designer

MakerCAM has a preference for handling this on import.

Previewing Cuts

 * Dupe the paths: Edit | Select All, Edit | Copy, Edit | Paste in Place
 * offset them in the appropriate direction by half the bit diameter, for profiles this is out (Path | Outset), for pockets, in (Path | Inset) Unfortunately, Inkscape doesn't afford one much control over this --- you'll have to do it multiple times (seems to be 1 pixel each time) until you get close --- draw in an appropriately sized circle first. FYI Dynamic offset is buggy and may be removed.
 * set the stroke to the width of the bit and rounded ends and corners. Object | Fill and Stroke --- set Width appropriately, Join and cap should be the middle (rounded) options.

Laser Support
To run a vector directly from Inkscape you have to set your laser as the default system printer, click on "Extensions", click "Export", click "Win32 Vector Print" and that will pop up your laser driver IF you set it as your windows default first.

http://jtechphotonics.com/?page_id=2012

Manually creating tabs



 * 1) draw the geometry
 * 2) set the stroke of the path to twice the desired width of the pcket
 * 3) Path | Stroke to Path
 * 4) Path | Break Object Apart
 * 5) remove the fill and set the object to have a stroke, delete the extra inner path
 * 6) duplicate the original geometry
 * 7) Path | Combine it with the outer path created above
 * 8) draw in the additional geometry in such a way that it can be subtracted from the above --- you may need to duplicate the above several times. I did Path | Intersection

Brief notes for new users
Files which come in from .dxfs will often be separate, discrete paths, as opposed to closed paths. In some instances this can be fixed by selecting everything and choosing Path | Combine.

Only closed paths are suitable for use w/ profile and pocket commands in most CAM programs.

Tracing pixel images: https://www.shapeoko.com/forum/viewtopic.php?f=7&t=9188&p=68572#p68572

Useful Extensions for CNC Operators
Listing of Inkscape extensions with commentary: https://gist.github.com/su-v/9965739

Gcodetools
Homepage: gcodetools http://www.mycncuk.com/threads/2221-Free-CAM-for-Inkscape

(To be included with versions of Inkscape 0.49 and higher)

Gcodetools provides Inkscape with several operations for generating G-code which you can send to your ShapeOko. Inkscape and Gcodetools together can replace the traditional CAD/CAM workflow entirely.

Warning: When creating G-code to use with GRBL, always choose the "Round all values to 4 digits" Post-processor in the "Preferences" tab! Without this option selected, codes will often exceed the 50- or 70-character-per-line limit present in GRBL, resulting in deformed shapes on the machine.

Esp. see the tutorial (linked below): http://www.shapeoko.com/wiki/index.php/User:BHSPitMonkey/Inkscape_and_Gcodetools_Tutorial

Bit angles are handled oddly. Fortunately the default, w, is a 90 degree V-bit.

Source on GitHub: https://github.com/cnc-club/gcodetools

ImportGCode
https://github.com/ClayJarCom/ImportGCode --- https://community.carbide3d.com/t/importgcode-an-inkscape-input-extension/13729

BoxMaker
Homepage: Tabbed Box Maker

This extension generates tabbed pieces for building boxes whose sides interlock together. Visit the link above for a better explanation with pictures.

c.f., https://github.com/hellerbarde/inkscape-boxmaker

See also T-Slot Boxmaker which allows the use of screws instead of glue.

Hershey Text
Homepage: Hershey Text

New v3: https://www.evilmadscientist.com/2019/hershey-text-v30/ (which will be bundled in Inkscape)

Hershey Text is an extension that generates CNC-friendly text paths using special engraving fonts.

Interface w/ OpenSCAD
See OpenSCAD: Interface w/ Inkscape.

Export to TikZ
There is an extension which will export from Inkscape to TikZ, a programmatic diagramming language, which will allow re-use of InkScape paths: Inkscape to TikZ exporter

Export to DXF
Modifications of Better Better DXF Output, Big Blue Saw's DXF Export For Inkscape. Fixes for v0.91: http://www.shapeoko.com/forum/viewtopic.php?f=6&t=5506

See also Better DXF Output.

Note that DXF export must resolve Inkscape using Bezier curves while DXF uses NURBS, requiring a path approximation for anything but perfect circles and arcs.

Import DXF
http://sourceforge.net/projects/dxf-svg-convert/ --- A dxf to svg converter. Can be used to create pure svg files or Inkscape svg files with extra information like layers. c.f., https://github.com/samyk/samytools/blob/master/2svg

Gcode Extension
Simplistic extension which will directly maps the points on paths to straight lines, necessitating that one add additional points to approximate curves: http://wiki.linuxcnc.org/cgi-bin/wiki.pl?InkscapeHowto

MakerBot Unicorn G-Code Output for Inkscape Plugin
http://makerbot.wikidot.com/unicorn-output-for-inkscape

Source: https://github.com/martymcguire/inkscape-unicorn

http://www.thingiverse.com/thing:5986

Fork: https://github.com/Emerica/inkscape-shapeoko3

CAMM-GL
Vinyl cutting utility for Inkscape Win32.

wirecutter
Plugin to generate g-Code for a 2D wirecutter with a turning table. http://sourceforge.net/projects/wirecutter-inkscape-plugin

close curves extension
http://plugintop.com/inkscape-extension-close-curves/

G-Code import
https://github.com/ClayJarCom/ImportGCode --- Inkscape plugin to import G-Code

Utility programs for SVG files
https://jakearchibald.github.io/svgomg/ --- will remove / clear empty paths

Tutorials and Examples

 * https://community.carbide3d.com/t/basic-path-manipulation-in-inkscape/14138
 * Gear Coaster --- Video tutorial.
 * User:BHSPitMonkey has begun an Inkscape and Gcodetools_Tutorial which covers drawing shapes and cutting them out
 * The Melbourne hackerspace made Inkscape G-Code Tools
 * http://wiki.linuxcnc.org/cgi-bin/wiki.pl?InkscapeHowto --- covers gcodetools and gcode extension
 * Tutorial CAD/CAM 3D Diamond-Circle-Square InkScape/MakerCAM
 * Forum discussion showing a typical part drawn naïvely in Adobe Illustrator and how to fix it using InkScape: Re: Wooden gear DFX/DWG file to cut using Makercam. --- includes general guidelines on drawing vector paths.
 * http://rasterweb.net/raster/2013/01/06/the-making-of-make/
 * https://www.norwegiancreations.com/2015/08/an-intro-to-g-code-and-how-to-generate-it-using-inkscape/

A game to learn about forming Bézier curves: http://bezier.method.ac/#

A Primer on Bézier Curves