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

overlapping polygons on results fixes #11 #53

Merged
merged 2 commits into from
Feb 28, 2025
Merged

Conversation

Dexus
Copy link
Member

@Dexus Dexus commented Feb 27, 2025

This pull request enhances the part placement algorithm in main/background.js by adding a more rigorous overlap check and final verification before accepting a position. It also introduces several utility functions to support these enhancements. Additionally, a new configuration parameter is added in main/deepnest.js.

Enhancements to part placement algorithm:

  • Added a theoretical placement and overlap check before considering a position in placeParts function.
  • Added final verification to ensure no overlap before accepting a position in placeParts function.

Utility functions for overlap checking:

  • Introduced checkPlacementOverlap function to check for overlaps with a safety margin.
  • Added expandPolygon, isPointInPolygon, and doLinesIntersect helper functions to support the overlap check.

Configuration updates:

  • Added overlapTolerance parameter to the configuration in main/deepnest.js.

@Dexus Dexus force-pushed the dev/overlapping-issues branch from 0d62483 to f99db97 Compare February 27, 2025 15:46
@Dexus Dexus force-pushed the dev/overlapping-issues branch from f99db97 to 0f033d1 Compare February 27, 2025 15:48
@Dexus Dexus linked an issue Feb 27, 2025 that may be closed by this pull request
@Dexus Dexus added this to the v1.5.0 milestone Feb 27, 2025
@Dexus Dexus merged commit 0da71fb into main Feb 28, 2025
5 checks passed
@Dexus Dexus deleted the dev/overlapping-issues branch February 28, 2025 07:30
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.

🐛 Overlapping parts
1 participant