Missing Lines When Importing SVG Made In Inkscape

I searched around and found an Inkscape extension that lets you close any selected path(s) in one fell swoop. I made two quick UI updates to it (the dialog button is “Apply” not “ok”, and the other extensions use Title Case) and attached the extension as a ZIP file. To “install” it, you just have to extract the two files inside and put them in your Inkscape extensions directory, e.g. “C:\Program Files\Inkscape\share\extensions” for my Inkscape install on Windows.

Close_Curves.zip (1.4 KB)

(The ZIP contains two files: an Inkscape extension definition file, “close_curves.inx”, and the very brief python script, “close_curves.py”, with maybe a dozen lines of code to do the closing via a RegEx incantation or two.)

Once you’ve extracted the two files to your Inkscape extensions directory and (re)started Inkscape, you’ll have a new menu entry: “Extensions/Modify Path/Close Curves…” To use it, you select your curves (e.g. just Ctrl-A or “Edit/Select All”), then open the extension and click “Apply”. (Or open the extension, then select your curves, then hit apply. We’re flexible here.) The extension will close any selected paths as necessary (by adding the parameter, ‘Z’, that means “and back to the beginning” in SVG path-ese).

Note that this may give you ugly results for some paths, e.g. a curvy path with start and end nodes at opposite ends of your workspace. You can fix up the paths by hand or just note what they are, undo, and address them in whatever way seems logical. Once you have closed paths, you can do things like the path math options (e.g. Difference, etc.) to get nice non-overlapping fit-like-a-glove pieces. (Personally, I like to Copy and Paste In Place, then work on the copies. Makes it easy to try, try again if I do something… unhelpful.)

2 Likes