Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add randomized running and fill stitches #2830

Merged
merged 6 commits into from
May 5, 2024

Conversation

george-steel
Copy link
Collaborator

@george-steel george-steel commented Apr 7, 2024

Add a mode to running stitch that uses randomized phase and stitch length instead of even spacing. This greatly reduces moire effects when stitching closely-spaced curves in running-stitch-based fills.

Add option for randomized running stitch to:

  • ripple stitch
  • circular fill
  • contour fill
  • guided fill
  • auto-fill

When is randomization is not selected, ripple stitch will use even running stitch when staggers are set to 0 (default) and the stagger algorithm from guided fill (which does not look nice with a stagger period of 0) when staggers is nonzero.

Also includes fix for satin contour underlays (missing tolerance default) mentioned in #2814. This sets the default tolerance to 0.2mm, which is the largest tolerance guaranteed to be backwards-compatible with existing designs using the default inset of 0.4mm.

@george-steel
Copy link
Collaborator Author

@kaalleen @tyrosinase This is what we discussed earlier in #2281

@george-steel
Copy link
Collaborator Author

Here is an example of a design using regular, then randomized modes.

same design with and without randomization

@kaalleen
Copy link
Collaborator

Nice, I do like the random running stitch feature a lot!!
Is there a reason that this is marked as draft?

@george-steel
Copy link
Collaborator Author

Is there a reason that this is marked as draft?

@kaalleen It's marked as draft because it is blocked by #2655. I also want to add the randomization option to auto-fill.

@@ -374,7 +374,7 @@ def staggers(self):
tooltip=_('The last stitch in each row is quite close to the first stitch in the next row. '
'Skipping it decreases stitch count and density.'),
type='boolean',
sort_index=26,
sort_index=30,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do hate the sort_index thing so much, even though I'm the one that added it. I can't wait until we redo the GUI entirely.

@lexelby
Copy link
Member

lexelby commented Apr 16, 2024

Nice!! The moire effects have been really bugging me. This produces a much nicer result.

It's funny... looking way back at the start of Ink/Stitch, the original fill stitch algorithm used random phase. It gave far lower-quality results with weird banding and moire effects, so I implemented staggering. In this case though, random is much better :)

@lexelby
Copy link
Member

lexelby commented Apr 16, 2024

@george-steel I feel like I might have missed responding to one of your comments @-mentioning me recently, but I can't find it. If so, could you please point me to it?

Base automatically changed from george-steel/optional-stitch-plan-cache to main April 27, 2024 18:16
@george-steel george-steel force-pushed the george-steel/more-random-stitches branch from fc2d22b to 8d7d67b Compare April 27, 2024 18:21
@george-steel george-steel changed the title Add randomized running stitch mode Add randomized running and fill stitches May 1, 2024
@george-steel george-steel marked this pull request as ready for review May 1, 2024 21:33
@george-steel george-steel requested a review from lexelby May 1, 2024 21:33
@george-steel
Copy link
Collaborator Author

@kaalleen @lexelby I think this is ready. Please take a look.

@kaalleen
Copy link
Collaborator

kaalleen commented May 4, 2024

All good. Merge when you are ready.

@george-steel george-steel merged commit d32a8fd into main May 5, 2024
5 checks passed
@kaalleen kaalleen deleted the george-steel/more-random-stitches branch June 10, 2024 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants