Page 2 of 2

Re: svg to/from embroidery converter

Posted: Fri Oct 07, 2016 8:08 pm
by skflowne
Hey guys, kudos for these extensions. This is exactly what I would need for a web app, I'd like to know if there would be anyways to use one of these via a command line tool that I can install on my server ?

I wonder for example if the Python script could be run directly outside of inkscape if other dependencies are met ? Or if there would be a way to run the extension via the inkscape command line maybe ?

Re: svg to/from embroidery converter

Posted: Wed Nov 23, 2016 10:49 pm
by sergstetsuk
https://github.com/lexelby/inkscape-embroidery - is continuation of inkscape-embroidery project. It's enough robust now. Here you can find a video of this plugin in action: https://www.youtube.com/watch?v=HMLLkR07Z3Q

Re: svg to/from embroidery converter

Posted: Thu Nov 24, 2016 12:15 pm
by prkos
Wow this looks awesome!

Do you have a transcript or at least a short list of steps you followed in the video? It would help to have that on top of the documentation inside the extension.

Re: svg to/from embroidery converter

Posted: Thu Nov 24, 2016 6:06 pm
by sergstetsuk
Short description: We use here so called satin column. It is actually a two line path with the same number of points in each line. I've shown how to create satin column from text. Reproduction steps for one letter:
1. Draw text with text tool. Change size and font as you need
2. Convert Text to path with Path->ObjectToPath
3. Turn off fill color, make stroke color black or whatever you like
4. Delete 2 segments on the opposite ends of the path to create 2 separate lines in path.
5. Uncombine path to separate lines
6. Reverse one of those lines to make them true semi parallel
7. Combine them back
8. Add or delete points with Node tool to make both lines equal number of nodes (points)
9. Use Embroidery->Params and make this path a Satin Column
10. Run Embroidery->Embroider
I didn't try but maybe you don't need to uncombine/combine operations if you can reverse only one line in twoline path.

Re: svg to/from embroidery converter

Posted: Thu Nov 24, 2016 6:59 pm
by sergstetsuk
Here you have another video: How to convert resulting CSV to Brother PES format: https://www.youtube.com/watch?v=NK48fyFArUY
Steps:
1. Find resulting *.csv
2. Run:

Code: Select all

$ libembroidery-convert test.csv test.pes

3. Check resulting *.pes with pesconvert utility:

Code: Select all

 $ pesconvert test.pes test.png

Re: svg to/from embroidery converter

Posted: Mon Dec 12, 2016 11:12 pm
by ha1flosse
hey, i'm running inkscape 0.91 and your extension on ubuntu 12.04.

sadly, it doesn't work at all. shapely is installed correctly and is working correctly with the release of the extension by johnh. now your release won't and prints the error message:

Traceback (most recent call last):
File "embroider.py", line 38, in <module>
import shapely.affinity as affinity
ImportError: No module named affinity

would be cool to work from start to end with inkscape regarding embroidery, but for now, just the commercial solutions seem to complete the working-pipeline.

anyway, many thanks for your commitment and your work on the extension.

Re: svg to/from embroidery converter

Posted: Tue Jan 03, 2017 10:48 pm
by ha1flosse
in case you're encountering the following traceback-message

Traceback (most recent call last):
File "embroider.py", line 42, in <module>
import PyEmb
File "/home/user/.config/inkscape/extensions/PyEmb.py", line 11, in <module>
from backports.functools_lru_cache import lru_cache
ImportError: No module named backports.functools_lru_cache

you can add the missing python-module by installing "pip" (via terminal or softwarecenter "python-pip" on ubuntu) and add the module via commandline (ubuntu) by "sudo pip install backports.functools_lru_cache".

Re: svg to/from embroidery converter

Posted: Sun Jan 29, 2017 6:28 pm
by Maga
I've been reading this post with interest. I've been doing machine embroidery for over 20 years - first digitising software was DOS based and it is great to see that somebody has finally started being interested in trying to make an open source program. I don't want to in any way discourage you but there are so many things to ME that converting directly from a graphic to a stitch file (basically fill a graphic with stitches) is not going to create good embroidery.
Happily there are now lots of trial versions of digitising software available so can I suggest you take a look at some of those so you can keep in mind all the different things that needs to be taken into consideration when creating a stitch file. If you try out Embird Studio, Embrilliance Stitchartist, Wilcom Hatch and Art and Stitch you will gain a lot of experience of what a digitising software need to contain to work for the hobby embroiderer let alone one who does this for a living. Good luck with the project!

Re: svg to/from embroidery converter

Posted: Mon Jan 30, 2017 2:23 am
by brynn
Why is it that you think it won't make good embroidery? You sort of implied, I think, that dedicated software has more and/or better features. But it wasn't clear. If converting directly from a graphic to a stitch file doesn't make good embroidery, what does the dedicated sw put in between graphic and stitch file?

I'm not sure if this is the only embroidery extension for Inkscape. There was some discussion on the mailing list not too long ago about an extension, but I don't remember if it was the same as this one. So there may be a more (or less) developed one out there. You realize that Inkscape is not trying to be embroidery digitizing sw, but this is just a plug-in, right?

Re: svg to/from embroidery converter

Posted: Mon Jan 30, 2017 8:37 am
by Maga
Hi Brynn,
brynn wrote:Why is it that you think it won't make good embroidery? You sort of implied, I think, that dedicated software has more and/or better features. But it wasn't clear. If converting directly from a graphic to a stitch file doesn't make good embroidery, what does the dedicated sw put in between graphic and stitch file?

I'm not sure if this is the only embroidery extension for Inkscape. There was some discussion on the mailing list not too long ago about an extension, but I don't remember if it was the same as this one. So there may be a more (or less) developed one out there. You realize that Inkscape is not trying to be embroidery digitizing sw, but this is just a plug-in, right?


Maybe I misunderstood then. I thought what the developpers here tried to make was something that would transform a svg graphics to a file an embroidery machine could stitch out? Maybe it is meant to be a file that you take into a digitising program and then edit?

If you just fill a graphic with stitches it will not look the same when stitched as it does on the screen. Let me give you an example:
A circle on the screen will stitch out as a circle on the machine if you just use a running stitch (like a stroke) all well and good - however if you fill the circle with stitches two things happen:
1 the sides where the stitches go to and from will pull in
2 the ends where the stitching starts and finish will experience push of fabric
so in order to create a perfect circle on the fabric you embroider you draw a slight oval and fill that with stitches

If you have two columns that meet each other along a side and the stitches go perpendicular to the side that meet you will have to have an overlap of the columns so there doesn't end up being a gap in the stitch out if you fill those column with stitches.

You ask what dedicated software puts in between the graphic and the stitch file; the easiest answer to that is pull and push compensation, underlay for the stitches to "sit on" or it can be a digitiser who only use the graphic as guide to deciding where the stitches should start and end and that is before you start taking into consideration what fabric the final design will be embroidered on because the pull/push is different from a denim to a homespun to a knit fabric. Machine embroidery is not an exact science and auto digitising has to have a lot of complex algorithms in order for it to work to a degree where it is good enough to use and then it is usually only as a starting point. As I mentioned above running stitches are very forgiving but fill stitches are not and satin columns are very tricky to get just right. The angle of the fill stitches in relation to the weave direction of the fabric is also someting that needs to be taken into consideration. The stitches you decide on as underlay for the actual design is of immense importance.

As you can tell I love digitising. I use Inkscape to draw the designs before taking it into a digitising software where I redraw the shapes while taking into consideration what fabric I am going to stitch the design on as well as use some of the digitising programs features for adding underlay and compensation but these are not really necessary to have as long as you know how much you need to alter the shapes in order for them to come out as they should in the finished design. You can do it all with multiple shapes with using different sizes and taking into consideration the angles of the stitches but that is jolly hard work so of course it is an advantage to have some of the bells and whistles that the modern digitising programs offer to use.

If you are interested in learning more on the subject a new video has just been released that is an excellent tutorial in what happens between a graphic and what you get on fabric:
https://www.youtube.com/watch?v=JVT1CzmEaAk
(this is not the program I use for digitising so have no interest in promoting it!)

Re: svg to/from embroidery converter

Posted: Mon Jan 30, 2017 2:58 pm
by brynn
Maybe I misunderstood then. I thought what the developpers here tried to make was something that would transform a svg graphics to a file an embroidery machine could stitch out? Maybe it is meant to be a file that you take into a digitising program and then edit?


Well I don't know for sure. But by the title of the topic, the extension sends an SVG file to an "embroidery converter". Whether a digitiser is a converter, I don't really know. Or maybe "converter" is somewhat redundant in clarifying "to/from". Maybe it converts from SVG to an embroidery (file) format. I don't know if that's the same thing as digitizing.

I do remember that ha1flosse had some challenge with the texture of the fabric he was embroidering on (t-shirt, I think). And I don't remember if he mentioned any underlayment. But in the end, I think he got a reasonably acceptable result.

But in any case, I'm not sure if the author (single author, afaik) of this extension means it as a free digitiser. They would have to reply themselves to explain that. But Inkscape is a vector graphics editor, which does many, many, many things, and much, much, much more than what this one extension offers. I just did a quick count, and found approx 140 extensions that ship with (the current version of) Inkscape, and there are nearly 300 more that are available separately (although I'd guess that probably only approx half are functional with the current version). And as far as Inkscape features, that's not to mention the 21 major tools which do the work on the canvas (draw the paths for the embroidery image, for example) and other amazing functionality that doesn't fit neatly into a single tool.

I hope the extension author does reply. I'll be interested to find out if it digitizes.

Re: svg to/from embroidery converter

Posted: Tue Feb 14, 2017 11:24 am
by ha1flosse
Maga wrote:I've been reading this post with interest. I've been doing machine embroidery for over 20 years - first digitising software was DOS based and it is great to see that somebody has finally started being interested in trying to make an open source program. I don't want to in any way discourage you but there are so many things to ME that converting directly from a graphic to a stitch file (basically fill a graphic with stitches) is not going to create good embroidery.
Happily there are now lots of trial versions of digitising software available so can I suggest you take a look at some of those so you can keep in mind all the different things that needs to be taken into consideration when creating a stitch file. If you try out Embird Studio, Embrilliance Stitchartist, Wilcom Hatch and Art and Stitch you will gain a lot of experience of what a digitising software need to contain to work for the hobby embroiderer let alone one who does this for a living. Good luck with the project!


cool, 20 years of experience is a lot! i've just been reading some articles about the structure of an embroidery-file and what the machine is reading of it in order to put it onto textile. to my very basic understanding most files contain a path the machine is running from start to end. the plugins for inkscape i've been testing so far provide a very basic digitizing functionality for shapes/paths of the svg-illustration. yes, there is a lot of functionality missing at this very early stage, so i am also doubting someone could use it for a professional workflow right now. but its usable and from an artists point of view regarding what you want to put on textiles, you can already use it and create embroidery-pieces with the the plugins. its just a first step of a still long way to go, but maybe there will be better functionality in the future. as is said in another discussion, i would spend money on this development not just because there is no alternative to the commercial tools right now.

Maga wrote:As you can tell I love digitising. I use Inkscape to draw the designs before taking it into a digitising software where I redraw the shapes while taking into consideration what fabric I am going to stitch the design on as well as use some of the digitising programs features for adding underlay and compensation but these are not really necessary to have as long as you know how much you need to alter the shapes in order for them to come out as they should in the finished design. You can do it all with multiple shapes with using different sizes and taking into consideration the angles of the stitches but that is jolly hard work so of course it is an advantage to have some of the bells and whistles that the modern digitising programs offer to use.


i am still confused why digitizing is still such a tricky task looking at all the expensive "modern" programs. some of them are lacking basic functionality but are sold from 300 -1000$. i thought we're in the 21st century but the algorithms of modern digitizing software is still not able to calculate most non-standard shapes without hand editing? i've been working with embird for a short while and the whole process from svg to embroidery-ready file is kind of bumpy. most times, the digitizer is not able to calculate the stitches of a non-standard shape correctly. so embird ist the cheapest tool on the market, but the more expensive tools ain't topping edge too.

my actual piece for example

Image

needs a lot of work in embird at a great number of corners event though the svg-template is already pretty simple. i would really like to do this with inkscape on the fly, but naturally there is a giant leap between the plugins and the commercial programs right now which is kind of reasonable looking at the freetime - development of the plugins. maybe they will become a nice alternative to commercial products in the far future. inkscape and other open source tools became this too, so why not? would be cool if you could put something from your wealth of experience into this. the sources of the plugins are available at github as you know.

..until then - maybe you're in the mute to show us some artwork of yours, there should be a alot stuff from 20 years.

Re: svg to/from embroidery converter

Posted: Fri Mar 24, 2017 7:17 pm
by Maga
Hi ha1flosse,

Sorry I have not replied to your post but been busy and time has flown. I have just posted a short message with a link to an example of my most recent work here: viewtopic.php?f=20&t=32063

From my experience over the years with all the surprises a design can treat you to is that no matter how sophisticated an algorithm you come up with it will never be able to adjust for the differences you encounter with fabric combined with stabiliser, thread, hoop size and add to that the quirks of the machine doing the embroidery, the ability of the "hooper" to hoop the fabric. Some of the expensive programs try to involve "styles" to adjust for different fabrics and threads and they do work to a certain extend but what to one person is thin woven fabric to others are medium, knit can be anything from sweater knit to slinky tightly knit fabrics and although a design digitised for woven fabric can be altered to stitch on these fabric through some general tweaking and changing stabilisers in most instances you have to change the design quite a lot to get a good quality stitch out. I know that in these times with people only wearing their garments one or twice then throw them out perhaps quality is not foremost in the mind and the auto-digitising offered by a number of home embroidery programs suits a lot of people. However if you sell your work few are prepared to pay for the trials and errors it takes to make a design stitch nicely whish is why it is important to have as good a tool as you can afford when it comes to programs. I sometimes think that if the moon is not in the right quarter, the stars not lined correctly and my tongue not at the right angle out th ecorner of my mouth the design will be a bugger but then you have the days when the design stitches just great the first time around on the 3 different fabrics you try :P
I totally agree with you that even the expensive software fall short of offering anything real worth forking out the extra money on but of course each to his/her own. Determination I think is the main ingredient when it comes to digitising - I do though wish the plug-in developpers all the very best of luck and look forward to the day when I have the time to start playing with them. Perhaps at that stage I can ditch the programs I use now and only use Inkscape - that would truly be a great day.

Maga

Re: svg to/from embroidery converter

Posted: Tue Apr 11, 2017 4:58 am
by sergstetsuk
ha1flosse wrote:hey, i'm running inkscape 0.91 and your extension on ubuntu 12.04.

sadly, it doesn't work at all. shapely is installed correctly and is working correctly with the release of the extension by johnh. now your release won't and prints the error message:

Traceback (most recent call last):
File "embroider.py", line 38, in <module>
import shapely.affinity as affinity
ImportError: No module named affinity

would be cool to work from start to end with inkscape regarding embroidery, but for now, just the commercial solutions seem to complete the working-pipeline.

anyway, many thanks for your commitment and your work on the extension.


I'm not sure. Maybe you forgot to save svg image? Plugin doesn't work on unsaved files (no real path and name defined).

Re: svg to/from embroidery converter

Posted: Tue Apr 25, 2017 11:42 pm
by sergstetsuk
I totally agree with you that even the expensive software fall short of offering anything real worth forking out the extra money on but of course each to his/her own.

Of course. I can show real results of the embroidery I needed. It's just one-time job with small quantity. I had no money (even 100$) and time to buy dedicated software. I even hadn't got embroidery machine.
https://2.bp.blogspot.com/-8eDfbaXHhgI/ ... 0%25BD.jpg

Full description (use google transla): http://mempages.blogspot.com/2016/10/linux.html

Re: svg to/from embroidery converter

Posted: Fri Jun 02, 2017 2:22 am
by alltribz
Hi is there a way I can use it to upload a PXF file to convert to svg?

Thanks!!

Re: svg to/from embroidery converter

Posted: Sat Jun 03, 2017 2:13 am
by brynn
Is there a way to use what? to upload PXF and convert to SVG? Are you asking about Inkscape or embroidery?

Is this the format you mean? https://fileinfo.com/extension/pxf

If you're talking about Inkscape, and if PXF files are text files, translated from one language to another, you can probably use File menu > Import, to bring the text file into Inkscape. Or you might be able to just copy the text from the file, and paste into Inkscape.

After the text is showing in Inkscape, click on it, to select it. Then Path menu > Union, which converts the text to path. Then File menu > Save As > SVG.

Re: svg to/from embroidery converter

Posted: Thu Aug 03, 2017 6:32 am
by knobba
With svg2embr you will first need to convert pxf to exp file and then convert the exp to svg. As far as I have understood the pxf is a Pulse-file and you would need Pulse Ambassador to convert it to .exp or .pcs. This link says that Pulse Ambassador will do that: http://www.embroiderybayou.com/products/