Skip to content

scanline to strands - #35

Merged
mariobodemann merged 6 commits into
mainfrom
polish/scanline-to-strands
Sep 5, 2025
Merged

scanline to strands#35
mariobodemann merged 6 commits into
mainfrom
polish/scanline-to-strands

Conversation

@mariobodemann

@mariobodemann mariobodemann commented Aug 31, 2025

Copy link
Copy Markdown
Contributor

together with some minor polishing, this pr changes how a reduced bitmap gets transformed into an embroidery: Instead of simply taking the complete scan line of one color per bitmap row, we section out all "strands of colors" (connected pixels of same color) and sort them so that we minimize the amount of jumps between them.

The sorting compare the end of the current strand to all start and endpoints of remaining strands.

Once the closest remaining strand is found, it gets' determined, if the direction should be inverted: If the end point of the strand is the closest to our existing stitches, then the incoming new strand needs to be inverted.

Makes better looking stitches with less jumping.

Previous:

Now:

zewizard.mp4

@mariobodemann
mariobodemann force-pushed the polish/scanline-to-strands branch from 727464d to 74b4582 Compare September 5, 2025 08:32
@mariobodemann
mariobodemann added this pull request to the merge queue Sep 5, 2025
Merged via the queue into main with commit ff1e426 Sep 5, 2025
1 check passed
@mariobodemann
mariobodemann deleted the polish/scanline-to-strands branch September 5, 2025 16:31
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.

1 participant