summaryrefslogtreecommitdiff
path: root/embroider.py
AgeCommit message (Collapse)Author
2018-03-30print through web browser (#127)Lex Neva
* spawn a web server and open a printable view of the design in the user's web browser * configurable inclusion of client and operator views * editable fields for color names, client, title, and purchase order number * groundwork laid to save these parameters back into the SVG * major refactor of codebase to support printing * code is organized logically into modules * added inkstitch logo and branding guidelines * l10n text extraction now handled by babel * removed legacy embroider_update extension * partial fix for #125
2018-03-01Fill underlay inset (#108)Lex Neva
* interim commit * implement underlay inset * more refactoring
2018-02-27fix stroke regressionLex Neva
2018-02-27Tie-in and tie-off (#100)Lex Neva
* turn inkstitch.py into a module * add running stitch library function * tie-in and tie-off * remove temporary testing code
2018-02-26user can specify origin for embroidery output by setting up guides (#52)Lex Neva
* user can specify origin using guides * embroidery origin defaults to center of canvas
2018-02-24use gettext for params tab names (#68)Lex Neva
* use gettext for params tab names * new localization messages
2018-02-22Windows fixes (#83)Lex Neva
* os.execv doesn't replace the process on windows * fix simulate/params crash * pyinstaller windowed mode breaks things? * fix output routing for windows * properly route stderr to inkscape too * don't print unless there's something to print * remove last backup version if necessary * add documentation for Windows build
2018-02-04framework for translations (#55)Lex Neva
sets up all the plumbing to send strings to CrowdIn for translation and incorporate the results
2018-01-28protect against bad values for certain params (#44)Lex Neva
This is a stopgap measure to prevent the extension from infinitely looping if the user mistakenly gives a zero or negative value for zig-zag spacing or running stitch length. It's definitely not ideal -- the user is still allowed to enter invalid numbers, but the extension just interprets any zero value as 0.01. In the future, I'll refactor things to add proper bounds-checking for parameters and limit the values that can be entered in the UI.
2018-01-28Fix simulate (#42)Lex Neva
* Simulate now works regardless of the output format you chose when you ran Embroider. * Simulate (and the preview in Params) now respects TRIMs. * Inkscape restart required (embroider.inx changed). This one kind of grew in the telling. #37 was a theoretically simple bug, but in reality, the code necessary to fix it was the straw that broke the camel's back, and I had to do a fair bit of (much needed) code reorganization. Mostly the reorganization was just under the hood, but there was one user-facing change around the Embroider extension's settings window. Way back in the day, the only way to control things like the stitch length or satin density was through global options specified in the extension settings. We've long since moved to per-object params, but for backward compatibility, ink/stitch defaulted to the command-line arguments. That means that it was possible to get different stitch results from the same SVG file if you changed the extension's settings. For that reason, I never touched mine. I didn't intend for my users to use those extension-level settings at all, and I've planned to remove those settings for awhile now. At this point, the extension settings just getting in the way of implementing more features, so I'm getting rid of them and moving the defaults into the parameters system. I've still left things like the output format and the collapse length (although I'm considering moving that one too).
2018-01-23add params for "TRIM after" and "STOP after" (#29)Lex Neva
* adds new options to Params: "TRIM after" and "STOP after" * adds tooltip support to Params * inkstitch now includes libembroidery and can directly output any supported file type * this avoids the need for `libembroidery-convert` and compiling embroidermodder! * TRIM support for DST format (inserts 3 JUMPs) * STOP command supported as an extra color change that the operator can assign to code C00 * TRIMs cause the following jump stitch not to be displayed in the Embroidery layer
2018-01-04remove pixels_per_mm optionLex Neva
2018-01-04parse and use viewBox attributeLex Neva
The viewBox effectively adds global scaling and translation to all shapes in the SVG. Borrowing from inkscape-silhouette, we construct a transform from the viewBox and apply it to all objects. When adding the stitch plan into the SVG, we need to compensate for this implied transformation, which we do by adding its inverse as a transform on the stitch plan polylines. All of this allows us to do away with the nonstandard 10 pixels per mm that was previously hardcoded into inkstitch. Old designs can add a viewBox to switch from 10 pixels per mm to the standard 96 ppi that Inkscape uses.
2017-12-30params simulate windowLex Neva
when you change params, a simulate window opens to preview the results right away
2017-11-25don't infinitely loop in build_graph heuristicLex Neva
2017-11-23don't omit jump stitchesLex Neva
2017-11-20fix param definition for zigzag underlay insetLex Neva
clearly I've never set this manually
2017-11-19switch stitch view from paths to polylinesLex Neva
Polylines in SVG are essentially the same thing as paths, but with no curves. But inkscape-embroidery treats polylines as literal stitches; it does not do satins, fills, etc but instead takes the coordinates and uses them directly as stitches. The advantage in this case is that one can re-run the extension on its own output and get back the same stitch output. Why would you want to do this? Consider the case where you have a basic embroidery machine that can only do a 4x4" square. If you have something that's a bit bigger than 4 inches wide, it might still fit in the square if you turn it at an angle. But working with your entire design rotated at an angle is a total pain, and you'd also have to rotate the angles of all the fills to compensate. Instead, just run the extension, rotate the stitches to fit, and re-run, and your stitch file will work on your 4x4" machine.
2017-11-18remove copyright notices made redundant by LICENSE fileLex Neva
2017-11-18rudimentary gradient support, only for manual fill currentlyLex Neva
2017-11-14fix brainoLex Neva
2017-11-11now compatible with networkx 2.0Lex Neva
2017-11-10fix copypaste fail in 0986c8f2dbLex Neva
2017-11-05allow specification of output file for standalone processingLex Neva
2017-10-28fix occasional failure of which_outline()Lex Neva
2017-10-25preserve order of rails in satin with rungsLex Neva
2017-10-22add handling for <polyline>Lex Neva
2017-10-18resurrect correct connect_points algorithmLex Neva
2017-10-17don't go the long way around the outlineLex Neva
2017-10-17fix snipping of unnecessary outline sectionLex Neva
2017-09-27bugfix and useful warningLex Neva
2017-09-24way easier satin column using additional subpaths to delineate sectionsLex Neva
2017-09-23fix handling of starting point / last stitchLex Neva
2017-09-23ignore empty subpathsLex Neva
2017-09-23rewrite of autofill to handle arbitrary holes!Lex Neva
2017-02-05bugfix in is_same_runLex Neva
2017-02-05fix type for pixels_per_mm optionLex Neva
2017-01-20fix nasty stroke bugLex Neva
2016-12-19bugfixLex Neva
2016-11-19bugfixLex Neva
2016-11-19params GUI fixupsLex Neva
2016-11-19rewrite of Embroidery Params into a full GUI appLex Neva
The Embroidery Params filter now pops up a full GTK dialog. This alows it to load existing values in the selected shapes and present them to the user. The user can also load and save presets. If selected shapes have differing values for a given param, the values are presented in a dropdown so the user can select one to apply to all.
2016-11-12clean up PyEmb.PointLex Neva
2016-11-11avoid doubly multiplying by pixels_per_mmLex Neva
2016-11-11add caching decoratorLex Neva
2016-11-09auto-fill: try to hide connecting stitches in the fill patternLex Neva
This lets us auto-fill regions with holes in it. Just cut the region exactly along the fill angle to convert a region with a hole to a region without. This: __________________ | | | ______ | | | | | | | | | | | | | | |______| | |__________________| Becomes this: __________________ | | | ______ | | | | | | | | | ===== | | | |______| | |__________________| The cut ( ===== ) is less than the width of the row spacing. Any connecting stitch that follows this path becomes hidden among the rest of the fill -- an extra row of stitching isn't visible so long as the staggers line up.
2016-11-07don't do auto-fill for regions with holesLex Neva
2016-11-06fix fill underlay paramsLex Neva
2016-11-06fix bug in get_paramLex Neva
2016-11-06pep8Lex Neva