Wykres commitów

38 Commity (dc587099a2e26ef6ce238ef709f508a91175a45d)

Autor SHA1 Wiadomość Data
Lex Neva 633ec88186
windows build (#79)
Ink/stitch now supports windows!
2018-02-19 21:43:39 -05:00
Lex Neva 72d52dc317
framework for translations (#55)
sets up all the plumbing to send strings to CrowdIn for translation and incorporate the results
2018-02-04 22:38:24 -05:00
Lex Neva 1dd76646cc
add margin around simulator (#46)
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-29 20:09:34 -05:00
Lex Neva 871802e4eb
properly notify GUI of Stroke being disabled (#43)
fixes #32: when changing from Stroke to Fill in params, the preview drew both.
2018-01-28 20:26:54 -05:00
Lex Neva fabe5bcd32
Fix simulate (#42)
* 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-28 16:10:37 -05:00
Lex Neva acaebaa956
add params for "TRIM after" and "STOP after" (#29)
* 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-23 20:13:37 -05:00
Lex Neva 3cd61b8ff9 automatically scale simulation window
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-06 15:49:44 -05:00
cclauss ece8f15eda Use sys.stderr_backup in both save and restore
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-06 15:22:15 -05:00
Lex Neva f50ec5e4c4 rename to ink/stitch 2018-01-03 11:09:18 -05:00
Lex Neva e9bddedf36 render objects in the correct order 2018-01-01 14:56:27 -05:00
Lex Neva 3cb4427fe6 make debugging slightly easier by popping up traceback 2017-12-31 22:55:57 -05:00
Lex Neva fd4d19bf8d don't start outdated simulation 2017-12-31 22:28:43 -05:00
Lex Neva c2388a53a6 adjust default simulation speed to always take ~5 seconds 2017-12-31 22:28:28 -05:00
Lex Neva 82fe2b7144 show simulate window at start 2017-12-31 22:10:10 -05:00
Lex Neva 85aafccf25 cancel should not output the SVG
also sped up simulation
2017-12-30 21:30:53 -05:00
Lex Neva cb6df39773 get rid of thread killing
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-30 21:16:58 -05:00
Lex Neva 7152caa14d render in a background thread
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-30 20:54:35 -05:00
Lex Neva 61ed1da1cf params simulate window
when you change params, a simulate window opens to preview the results right
away
2017-12-30 16:05:21 -05:00
Lex Neva 42b83d4ec4 fix trailing whitespace 2017-12-28 19:55:04 -05:00
Lex Neva 6a39517bd9 remove uses of wx.CB_SORT
Apparently that option is not available on OS X.  It's easy enough to just
sort the values before giving them to wxGTK.
2017-12-27 21:39:12 -05:00
Lex Neva f4d1843b98 add paired tab's dependent tabs to preset too 2017-09-27 01:17:06 +01:00
Lex Neva a13745e39b add 'use last settings' button 2017-06-14 00:43:42 +01:00
Lex Neva 5ac04a40b8 uniqify values 2017-01-05 03:36:20 +00:00
Lex Neva 2c2c58e572 Fill and Stroke are not mutually exclusive 2016-12-24 19:18:41 +00:00
Lex Neva 80a482af80 handle boolean parameters with no values 2016-11-19 22:52:33 -05:00
Lex Neva 5fbd665fb9 params GUI fixups 2016-11-19 21:45:47 -05:00
Lex Neva a7bfc17e7c rewrite of Embroidery Params into a full GUI app
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-19 16:11:24 -05:00
Lex Neva 50493add9e pep8 2016-11-06 19:30:49 -05:00
Lex Neva 6cdf990c76 add fill underlay settings to embroider_params and embroider_update extensions 2016-11-06 19:28:17 -05:00
Lex Neva 841e9196ba major refactor
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-11-02 23:20:31 -04:00
Lex Neva 9249a3ae77 pep8 fixes 2016-10-29 13:28:37 -04:00
Lex Neva 36085676c8 add center walk and zigzag underlay for satin
the code's a total hack, but it gets the job done
2016-10-19 21:43:23 -04:00
Lex Neva 9f59051c97 add satin underlay and offset params 2016-05-16 22:09:04 -04:00
Lex Neva 0e18512947 add pull compensation for satin columns 2016-05-14 15:19:50 -04:00
Lex Neva 55166bdedd a bunch of features and fixes
* 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-04-27 23:21:17 -04:00
Lex Neva d1cd63eecd get rid of randomness in fills
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-02-18 21:43:16 -05:00
Lex Neva b1e40861ad add satin column to embrioder params plugin 2016-01-30 23:01:34 -05:00
Lex Neva cf2db11d60 add 'Embroider Params' extension to set XML attributes on svg nodes 2016-01-20 03:04:32 -05:00