(re-)Introducing: ink/stitch, machine embroidery for Inkscape

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

(re-)Introducing: ink/stitch, machine embroidery for Inkscape

Lex Neva

Hi folks!  I'd like to reintroduce you to ink/stitch, formerly known as inkscape-embroidery.  A lot has happened in the past couple of months, and we now have a thriving and growing open source community around the extension!

The coolest new thing is that ink/stitch is available is a self-contained ZIP containing every Python dependency and all needed shared libraries.  There's also a Windows version and a Mac build is in the works.

I think you folks might be especially interested in our solution for creating the ZIP/tarball archive.  We're using the excellent Pyinstaller, which seems especially well-suited to packaging inkscape extensions.  Our goal is to avoid the kind of dependency hell that normally plagues extensions, especially those like ink/stitch that have their own GUI.

Pyinstaller packages everything into a native executable.  Interestingly, inkscape does not support native executables as extensions and requires an interpreter!  We get around this by including a basic stub Python script that executes the real extension binary and forwards the results back to inkscape.

Another interesting tidbit for inkscape devs is our localization support.  Ink/stitch is currently available in three languages, but the INX is not yet localized.  This is because inkscape's localization support for INX files depends on the extension translations being bundled with inkscape.  This obviously doesn't work for an extension with a fast release cycle.  We're exploring our options.

We'd love it if you'd check out project it and perhaps even give it a spin.  If you're interested in contributing, that'd be even cooler!  Right now, more folks with programming skills would be especially helpful as we have a long feature request backlog, but any contributions would be awesome.

Here's ink/stitch:

https://github.com/lexelby/inkstitch

Happy hacking,
Lex

On March 1, 2018 7:41:07 AM [hidden email] wrote:

Send Inkscape-devel mailing list submissions to
[hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
or, via email, send a message with subject or body 'help' to
[hidden email]

You can reach the person managing the list at
[hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Inkscape-devel digest..."

----------
Today's Topics:

1. Re: Wacom smartpad support - request for ideas (Martin Owens)

----------
Re: [Inkscape-devel] Wacom smartpad support - request for ideas
From: Martin Owens <[hidden email]>
Date: Feb 28, 9:39 PM
To: Peter Hutterer <[hidden email]>
CC: [hidden email], Benjamin Tissoires <[hidden email]>

I'm sorely tempted to buy one of these things to hack on it to be
honest.

if you do, buy a folio. we don't know if that works yet :)


OK I got the small folio, got a friendly discount at B&H so only $120.

our file format atm is just a json file with the raw data
(x/y/pressure in
arrays that are the strokes). we can produce whatever we want from
that. I
hear the mp3 patent has expired ;)


Unfortunatly inkscape doesn't support mp3s ;-P

Martin,



----------
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

----------
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: (re-)Introducing: ink/stitch, machine embroidery for Inkscape

Ted Gould

Very cool Lex,

I know you mentioned translations, but I'm curious about what other issues you've hit being an extension that is distributed separately from Inkscape. We've talked a bunch about how to decouple the release cycle of extensions and the core, but I'm not sure that we understand all of the problems.

Also, do you have any pictures of something embroidered using the extension? I saw the screencasts but I'd love to see the objects they resulted in as well.

Ted


On 03/01/2018 08:35 AM, Lex Neva wrote:

Hi folks!  I'd like to reintroduce you to ink/stitch, formerly known as inkscape-embroidery.  A lot has happened in the past couple of months, and we now have a thriving and growing open source community around the extension!

The coolest new thing is that ink/stitch is available is a self-contained ZIP containing every Python dependency and all needed shared libraries.  There's also a Windows version and a Mac build is in the works.

I think you folks might be especially interested in our solution for creating the ZIP/tarball archive.  We're using the excellent Pyinstaller, which seems especially well-suited to packaging inkscape extensions.  Our goal is to avoid the kind of dependency hell that normally plagues extensions, especially those like ink/stitch that have their own GUI.

Pyinstaller packages everything into a native executable.  Interestingly, inkscape does not support native executables as extensions and requires an interpreter!  We get around this by including a basic stub Python script that executes the real extension binary and forwards the results back to inkscape.

Another interesting tidbit for inkscape devs is our localization support.  Ink/stitch is currently available in three languages, but the INX is not yet localized.  This is because inkscape's localization support for INX files depends on the extension translations being bundled with inkscape.  This obviously doesn't work for an extension with a fast release cycle.  We're exploring our options.

We'd love it if you'd check out project it and perhaps even give it a spin.  If you're interested in contributing, that'd be even cooler!  Right now, more folks with programming skills would be especially helpful as we have a long feature request backlog, but any contributions would be awesome.

Here's ink/stitch:

https://github.com/lexelby/inkstitch

Happy hacking,
Lex

On March 1, 2018 7:41:07 AM [hidden email] wrote:

Send Inkscape-devel mailing list submissions to
[hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
or, via email, send a message with subject or body 'help' to
[hidden email]

You can reach the person managing the list at
[hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Inkscape-devel digest..."

----------
Today's Topics:

1. Re: Wacom smartpad support - request for ideas (Martin Owens)

----------
Re: [Inkscape-devel] Wacom smartpad support - request for ideas
From: Martin Owens [hidden email]
Date: Feb 28, 9:39 PM
To: Peter Hutterer [hidden email]
CC: [hidden email], Benjamin Tissoires [hidden email]

I'm sorely tempted to buy one of these things to hack on it to be
honest.

if you do, buy a folio. we don't know if that works yet :)


OK I got the small folio, got a friendly discount at B&H so only $120.

our file format atm is just a json file with the raw data
(x/y/pressure in
arrays that are the strokes). we can produce whatever we want from
that. I
hear the mp3 patent has expired ;)


Unfortunatly inkscape doesn't support mp3s ;-P

Martin,



----------
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

----------
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: (re-)Introducing: ink/stitch, machine embroidery for Inkscape

Lex Neva
In reply to this post by Lex Neva
On Sun, 2018-03-04 at 12:26 +0000, [hidden email] wrote:

Very cool Lex,

I know you mentioned translations, but I'm curious about what other issues you've hit being an extension that is distributed separately from Inkscape. We've talked a bunch about how to decouple the release cycle of extensions and the core, but I'm not sure that we understand all of the problems.


I'm so glad you asked! There are a few rough edges that we had to work around.  

In fact, one of them just came up: https://github.com/lexelby/inkstitch/issues/18#issuecomment-370301197. In that thread, we're talking about creating a PDF printout feature that shows the colors used in a design and the order they sew in. My original plan was to use the nifty, growing list of features in the command-line interface for Inkscape. My understanding is that these features are provided specifically to act as a "standard library" of functionality that can be used by extensions.

The problem with this is that extensions don't know where the Inkscape binary is. I can imagine writing code to guess, or perhaps look at the parent process, but trying to support Linux, Windows, and Mac sounds like a nightmare. End result: ink/stitch can't use this functionality.

Another rough edge is that extensions don't know where the current SVG file is stored on disk. We can access the file's basename, but not the directory. This is kind of annoying because ink/stitch wants to output a machine embroidery design file (.DST, .PES, etc). ink/stitch works around this by storing all of these files in a set "output directory" specified by the user, but this is obviously not ideal. Here's where one of our users/contributors discusses his desire for the design file to save alongside the SVG: https://github.com/lexelby/inkstitch/issues/75

I gather that Inkscape did previously store the directory, but it was removed due to privacy concerns. Perhaps the directory can be included in the SVG _only_ when communicating with an extension, not when saving? Another possibility is that the embroidery design output functionality could be an "output" extension, but I haven't played with that. I'm under the impression that the user would have to choose a folder and file name every time they wanted to save using an output plugin, which would be a prohibitively bad user experience for ink/stitch since it's common to repeatedly re-render the design file until you get it right.

"Dependency hell" is another big issue for extensions. Pyinstaller is very promising as a solution to this problem! I highly recommend mentioning it in the inkscape extension documentation. Trying to explain to users how to install python modules required by an extension is destined for failure. On Windows and Mac, the problem is even worse, as Inkscape bundles its own Python. It's very confusing for users that they can do `pip install -r requirements.txt` but then inkstitch still can't load its dependencies, because they didn't install the requirements in Inkscape's bundled Python. Installing modules for Windows's Python is especially complex.

Ultimately, we desire a completely smooth, painless installation process for our users. Currently, installation involves downloading a ZIP/tarball and uncompressing it in Inkscape's extensions directory. This is pretty smooth, and we could refine it even more by distributing it as a self-extracting installer. Anything more complex than uncompressing an archive risks losing users before they even try our extension.

One final thing: Inkscape's extension model is powerful and nifty, but of course it's also limiting. We've gone to a lot of lengths to work around this limitation, including popping up an entire UI of our own in one of ink/stitch's bundled extensions. Still, we constantly bump into the inability to integrate more directly with Inkscape, by adding tools or the like. I'm sure you've encountered this idea before. :) If Inkscape introduces such functionality, we'll be among the first to try it out.

Also, do you have any pictures of something embroidered using the extension? I saw the screencasts but I'd love to see the objects they resulted in as well.

Ted


Sure!  Here's a sampling of my favorite patches that I've made using ink/stitch:


https://github.com/lexelby/inkstitch/tree/master/images/patches


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel