summaryrefslogtreecommitdiff
path: root/embroider_params.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-02-24use gettext for params tab names (#68)Lex Neva
* use gettext for params tab names * new localization messages
2018-02-19windows build (#79)Lex Neva
Ink/stitch now supports windows!
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-29add margin around simulator (#46)Lex Neva
This adds a 10px margin around the design in the simulator view (both the Simulate plugin and the Params preview window). This is useful because otherwise stitches at the edges weren't very visible. Also, because we're using anti-aliased lines, parts of the drawing did actually extend beyond the canvas previously. All in all, with the margin it just feels more comfortable.
2018-01-28properly notify GUI of Stroke being disabled (#43)Lex Neva
fixes #32: when changing from Stroke to Fill in params, the preview drew both.
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-06automatically scale simulation windowLex Neva
The simulation window is scaled to fill the available space on the screen. In the Params dialog, the simulation window sits to the right of the Params window and fills the remaining space.
2018-01-06Use sys.stderr_backup in both save and restorecclauss
There is no __sys.stderr_backup__ defined in the [Python sys] module. __save_stderr()__ adds a variable by that name which is a bit unconventional but it does work. This PR changes __restore_stderr()__ to read that data from the same variable. Without this change, __restore_stderr()__ will probably raise a NameError at runtime because __stderr_backup__ is an undefined name. flake8 testing of https://github.com/lexelby/inkstitch on Python 2.7.14 $ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__ ``` ./embroider_params.py:748:18: F821 undefined name 'stderr_backup' sys.stderr = stderr_backup ^ ```
2018-01-03rename to ink/stitchLex Neva
2018-01-01render objects in the correct orderLex Neva
2017-12-31make debugging slightly easier by popping up tracebackLex Neva
2017-12-31don't start outdated simulationLex Neva
2017-12-31adjust default simulation speed to always take ~5 secondsLex Neva
2017-12-31show simulate window at startLex Neva
2017-12-30cancel should not output the SVGLex Neva
also sped up simulation
2017-12-30get rid of thread killingLex Neva
Switching to a cooperative model. This has the downside that a long patch computation will cause the simulate window to take longer to update, but in practice the longest this will be is a couple of seconds (for a very complicated autofill region).
2017-12-30render in a background threadLex Neva
The problem with this approach is that sometimes the SystemExit happens down inside shapely and it complains bitterly (on stderr). May have to rethink.
2017-12-30params simulate windowLex Neva
when you change params, a simulate window opens to preview the results right away
2017-12-28fix trailing whitespaceLex Neva
2017-12-27remove uses of wx.CB_SORTLex Neva
Apparently that option is not available on OS X. It's easy enough to just sort the values before giving them to wxGTK.
2017-09-27add paired tab's dependent tabs to preset tooLex Neva
2017-06-14add 'use last settings' buttonLex Neva
2017-01-05uniqify valuesLex Neva
2016-12-24Fill and Stroke are not mutually exclusiveLex Neva
2016-11-19handle boolean parameters with no valuesLex 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-06pep8Lex Neva
2016-11-06add fill underlay settings to embroider_params and embroider_update extensionsLex Neva
2016-11-02major refactorLex Neva
Split into classes for Fill, Stroke, and SatinColumn. Renamed params to be the same across XML attributes and OptionParser. Added distinct stitch length params for satin underlay. Renamed "satin underlay" to "contour underlay" and split out "center walk underlay" and "zigzag underlay". The code is ten times more readable, parameters make more sense, and everything is specified by the user in millimeters. Basically, everything is way better.
2016-10-29pep8 fixesLex Neva
2016-10-19add center walk and zigzag underlay for satinLex Neva
the code's a total hack, but it gets the job done
2016-05-16add satin underlay and offset paramsLex Neva
2016-05-14add pull compensation for satin columnsLex Neva
2016-04-27a bunch of features and fixesLex Neva
* added "flip" option for fills to start stitching in upper left rather than right * line up rows in abutting fills properly * handle intersect_with_grating intersection result that is a line or single point (skip row) * skip endpoint marker tags in SVG files (subtags look like paths) * dashed stroke indicates running stitch (<=0.5 width still works but is deprecated) * in running stitches, add a stitch at apex of sharp corners
2016-02-18get rid of randomness in fillsLex Neva
Previously, each row in a fill region was offset by a random amount. This looks better than not offsetting at all (which will create visible columns of stitches), but humans are very good at finding patterns in randomness. The result is that fill regions look weird. This commit instead carefully orders the stitches in fill regions such that each row's stitches are offset by half of max_stitch_length from the previous. There are also a couple of other miscellaneous fixes and features in here -- sorry about that.
2016-01-30add satin column to embrioder params pluginLex Neva
2016-01-20add 'Embroider Params' extension to set XML attributes on svg nodesLex Neva