PerfectlyNormal / purebyuu

Generate an SVG preview of a DST file, used for embroidery machines
MIT License
4 stars 1 forks source link

Couple quick explanations. #2

Open tatarize opened 4 years ago

tatarize commented 4 years ago

"There's also commands to enter and eject a sequin mode, which I have no idea what does. It currently has no effect on the preview document."

Sequins are little round shiny things that sometimes are applied to fabric. This is often sewn on by an embroidery machine. The sequin_mode command brings the hopper out and each time a JUMP is issued it ejects a sequin. So JUMP will at that point block the needlebar and eject a sequin on the specialty machines that have that attachment. For the most part they are ignored since it's not only an embroidery machine but a specialty embroidery machine that uses them. I have written some code that visualizes them at points. They are usually circles with like 3mm or 5mm diameters. You are perfectly fine ignoring them. I included them in the documentation for completeness, but the files with sequins are actually quite rare.

If you somehow wanted to visualize them, you actually could in a SVG, since they are generally circles with circles removed from them and throwing that in a <def> and calling it up in various places would be possible but even while I included every format known reading and writing, I never ever bothered to do that.

The files have no stitch information in them. While there are some additional formats like .edr that contain dst colors, these are rare. There's also sometimes extended dst headers which contain the thread information but these are even rarer than .edr. Most often a threadchart is printed up which lists the threads, colors, and order they are used. The machine itself reads DST and it comes from punchcard days and had no use for any color information.

--

Code all looks fine. Feel free to take liberally from https://github.com/EmbroidePy/pyembroidery if you need anything.

PerfectlyNormal commented 4 years ago

Hi

Thanks for that explanation! I looked it up some time later and found a description of what the sequin actually was, and concluded similarly to you that it doesn't really seem that important to handle.

I had some trouble getting the SVG to render correctly early on, and found some Python code I looked at, which probably was pyembroidery, so thanks for that as well :)