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

Massive Usability & Performance Changes #2

Merged
merged 9 commits into from
Feb 8, 2023

Conversation

micycle1
Copy link
Contributor

@micycle1 micycle1 commented Jan 4, 2023

I worked on the library when incorporating it into PGS. This PR forms the improvements made.

  • Performance is 2-5x faster (depending on input) due to re-using placed polygon bounding boxes and using a faster subroutine in the overlap function.
  • Added boolean flag to toggle whether to sort input polys by area (since often its desirable not to).
  • Refactor unclear identifier names (in classes, etc.).
  • Moved demo applet from src into test/src.
  • Failover to JTS' buffer operation when project offsetting fails (previously, code would often fail on moderately concave polygons like stars)
  • Separated the packing class into two logical components: DalsooPack (high-level interface to pack a collection of shapes) and Bin.
  • Added methods to easily get the packed polygons (such as getPackedPolys()).

polygons=300; abey=true; area-sort=false; time=~2.5s:

image

polygons=300; abey=true; area-sort=true; time=~2.5s:

image

polygons=200; abey=false; rotations=48; area-sort=false; time=~15.3s:
image

include fastmatm
some refactor
include jts to buffer convex polygons when degeneracy occurs
@micycle1 micycle1 marked this pull request as draft January 4, 2023 20:34
@micycle1 micycle1 marked this pull request as ready for review January 31, 2023 10:15
@whitegreen whitegreen merged commit bde2a3e into whitegreen:master Feb 8, 2023
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.

2 participants