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

New Extension: Break Apart and Retain Holes #653

merged 3 commits into from Apr 19, 2020


Copy link

@kaalleen kaalleen commented Apr 8, 2020

This aims to be a new extension as suggested in #360
It's located in the submenu "Fill Tools" (because it only makes sense for fill areas).

Copy link

lexelby commented Apr 8, 2020

This is the best idea ever. I've been thinking about a way to handle fill stitch for paths that contain separate unconnected shapes, but I hadn't thought through how to handle the holes. If this works we can use this code for that part!

Copy link
Collaborator Author

kaalleen commented Apr 10, 2020

The original idea was yours ;)

It'd be great if it could be of use for handling unconnected shapes without throwing an error message. For those who want to separated the elements with only one command (maybe to order them precisely), it'd be still useful as an extension.

I don't know if I maybe used too many for loops. Python has nice tools to avoid them, but I might not be aware of them :D

lib/extensions/ Outdated Show resolved Hide resolved
lib/extensions/ Outdated Show resolved Hide resolved
Copy link

lexelby commented Apr 18, 2020

I don't think you have too many loops! It only has two nested loops and I think it's probably gonna run fast even for complicated shapes.

I thought of a case that I think might cause trouble. What about a "bullseye" shape, something like this:


We don't want the outer circle to "eat" all of the middle circles. Maybe we should make it skip adding an other if the other is contained by one of the existing holes?

Copy link

lexelby commented Apr 18, 2020

OMG never mind, your code already does that! Awesome :D :D

Copy link
Collaborator Author

kaalleen commented Apr 19, 2020

Thank you for your review. These changes totally make sense. I've updated this branch.
The "bullseye" problem really seems to work great now :)
I have spend some time to think about it though.

@kaalleen kaalleen merged commit 2f4ca0c into master Apr 19, 2020
2 of 4 checks passed
@kaalleen kaalleen deleted the kaalleen/break-apart branch Apr 19, 2020
kaalleen added a commit that referenced this issue May 16, 2020
## New Features

- New Simulator (#531)
- Import Threadlist (#666)
- Export Threadlist in ZIP file (#664)
- Option to include SVG in ZIP file (#648)
- Break Apart and Retain Holes (#653)
- G-Code: option to alternate z-value (#659)
- New Stitch Plan Extension (#640)
- Optionally enable/disable ties (lock down stitches) (#619)
- Multiple Fill Underlays
- Additional Fonts (#683):
    * Geneva
    * DejaVu

## Improvements

- Better Algorithm for Satin Columns (#607)
- Better Algorithm for Fill Stitches (#606)
- Convert to Satin with Loops (#608)
- Adding '@ #' to all fonts (#680)

## Bug Fixes

- Fix Issue with Troubleshoot Pointer Position (#696)
- Inherit Styles (#673)
- Fix Color Palette Issues (#660)
- Preserve Aspect Ratio (#646)
- and more

## Under the Hood

- Namespaced Attributes (#657)
- Remove (#629)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants