Wykres commitów

117 Commity (d4a79b8a5e33003bf22b47d105699fb749652483)

Autor SHA1 Wiadomość Data
Lex Neva bc5357bc5a fix stroke regression 2018-02-27 23:14:14 -05:00
Lex Neva 88b4ff3e66
Tie-in and tie-off (#100)
* turn inkstitch.py into a module

* add running stitch library function

* tie-in and tie-off

* remove temporary testing code
2018-02-27 19:43:15 -05:00
Lex Neva 4e7520c013
user can specify origin for embroidery output by setting up guides (#52)
* user can specify origin using guides

* embroidery origin defaults to center of canvas
2018-02-26 19:42:18 -05:00
Lex Neva 0ecf74297c
use gettext for params tab names (#68)
* use gettext for params tab names

* new localization messages
2018-02-24 20:28:51 -05:00
Lex Neva bb42124a87
Windows fixes (#83)
* 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-22 23:06:27 -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 99c6b5f072
protect against bad values for certain params (#44)
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-28 21:02:45 -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 9778d85326 remove pixels_per_mm option 2018-01-04 22:43:12 -05:00
Lex Neva 7190d98dd4 parse and use viewBox attribute
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.
2018-01-04 21:05:53 -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 af7c27ec25 don't infinitely loop in build_graph heuristic 2017-11-25 21:22:56 +00:00
Lex Neva a8a79e38de don't omit jump stitches 2017-11-23 20:04:31 +00:00
Lex Neva 3cba500ff0 fix param definition for zigzag underlay inset
clearly I've never set this manually
2017-11-20 00:54:29 +00:00
Lex Neva 2695507dc3 switch stitch view from paths to polylines
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-19 01:18:48 +00:00
Lex Neva 06d985f11d remove copyright notices made redundant by LICENSE file 2017-11-18 20:52:34 +00:00
Lex Neva 2841cb8c6f rudimentary gradient support, only for manual fill currently 2017-11-18 20:11:43 +00:00
Lex Neva 2a97c5d25a fix braino 2017-11-14 01:02:14 +00:00
Lex Neva 68f246b0b7 now compatible with networkx 2.0 2017-11-11 01:15:53 +00:00
Lex Neva cd5b1663bf fix copypaste fail in 0986c8f2db 2017-11-10 03:35:56 +00:00
Lex Neva 0986c8f2db allow specification of output file for standalone processing 2017-11-05 00:44:57 +00:00
Lex Neva bd50c08b5d fix occasional failure of which_outline() 2017-10-28 21:27:16 +01:00
Lex Neva 806123b6ac preserve order of rails in satin with rungs 2017-10-25 03:12:10 +01:00
Lex Neva d40bf67180 add handling for <polyline> 2017-10-22 20:23:24 +01:00
Lex Neva bc64624719 resurrect correct connect_points algorithm 2017-10-18 04:44:26 +01:00
Lex Neva 6bfe4eb0d2 don't go the long way around the outline 2017-10-17 18:25:00 +01:00
Lex Neva eff59de06d fix snipping of unnecessary outline section 2017-10-17 18:24:45 +01:00
Lex Neva 4b78102632 bugfix and useful warning 2017-09-27 00:59:32 +01:00
Lex Neva 41effdbf9f way easier satin column using additional subpaths to delineate sections 2017-09-24 01:56:53 +01:00
Lex Neva 60d14f777f fix handling of starting point / last stitch 2017-09-23 02:42:58 +01:00
Lex Neva 4b8fa11942 ignore empty subpaths 2017-09-23 02:42:35 +01:00
Lex Neva 1e86acdc58 rewrite of autofill to handle arbitrary holes! 2017-09-23 01:03:33 +01:00
Lex Neva 8f9e6028f9 bugfix in is_same_run 2017-02-05 20:37:03 +00:00
Lex Neva 290f5cd1da fix type for pixels_per_mm option 2017-02-05 20:24:20 +00:00
Lex Neva 6bf62825c9 fix nasty stroke bug 2017-01-20 22:04:17 +00:00
Lex Neva 3afd6e500f bugfix 2016-12-19 02:58:21 +00:00
Lex Neva 4f895d6919 bugfix 2016-11-19 21:52:47 -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 1fedbc11b5 clean up PyEmb.Point 2016-11-12 14:05:09 -05:00
Lex Neva 055eb63bec avoid doubly multiplying by pixels_per_mm 2016-11-11 20:09:21 -05:00
Lex Neva 9d7a148f63 add caching decorator 2016-11-11 19:59:00 -05:00
Lex Neva b9637a9287 auto-fill: try to hide connecting stitches in the fill pattern
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-09 22:00:14 -05:00
Lex Neva a180cd7b16 don't do auto-fill for regions with holes 2016-11-07 20:55:12 -05:00
Lex Neva 45336a18dc fix fill underlay params 2016-11-06 20:00:28 -05:00
Lex Neva 78abc90459 fix bug in get_param 2016-11-06 19:47:01 -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 a28dbd2c2d default to auto-fill 2016-11-06 19:19:41 -05:00