Wykres commitów

33 Commity (ede0b2d0e6c2937182f3564948abf94c81503756)

Autor SHA1 Wiadomość Data
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