-
-
Notifications
You must be signed in to change notification settings - Fork 318
fix(core): Add strictMax property to bin pack() call #4092
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
@example123 is attempting to deploy a commit to the freesewing Team on Vercel. A member of the Team first needs to authorize it. |
Codecov Report
@@ Coverage Diff @@
## develop #4092 +/- ##
===========================================
- Coverage 98.43% 98.41% -0.02%
===========================================
Files 16 16
Lines 4731 4735 +4
Branches 588 589 +1
===========================================
+ Hits 4657 4660 +3
- Misses 69 70 +1
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
This is all feeling a bit ad-hoc and brings back memories to the time before the monorepo where changes in various repositories had to carefully click together to make things work. I really don't want to go back to that. So @eriese forked the bin-pack package for their fabric cutting layout. Do we want this? Not sure. I'm sort of letting things evolve as things are in alpha and I appreciate that we're still figuring out what works best. But if we are serious about maintaining our own fork of I feel that's something we need to figure out because my concern is that people are somewhat cavalier about the API boundary between core and our frontend. |
My feeling is that we were using an external library for bin-packing and as our needs evolved we changed to one that better suited our needs. That particular library is not actively maintained, so I forked it instead of submitting a PR that would never get merged.
I don't think we are serious about maintaining our own fork of
I do imagine that some people with their own implementations would appreciate being able to plug in their own packing library. Until we decide to do that, though, what Ben is suggesting here is that we allow full use of all the features available in the packing library that we are currently using. If we were to implement a plugin instead, it would presumably be identical code and it would want these changes Ben proposes.
It has benefits for the cutting layout, and that's the only current use case we can think of, but it's available for use in all circumstance, so I don't agree that it's blurring the boundary between front end and core. I think it still honors the idea that the core should not make decisions based on conditions that will only exist in our own front end. The only thing I would change here is that now that there are two packing-specific settings to look for, it might make sense to change to a |
Superseded by #5133 |
This PR adds a
strictMax
property to the binpack()
call to take advantage of packing improvements to be implemented in freesewing/bin-pack-with-constraints#1 .With that PR and this one, there will be improvements in parts packing in cutting layouts, as described in #3909.
This PR can be merged before or after eriese/bin-pack-with-constraints#1. Currently, the
strictMax
property is ignored bybin-pack-with-constraints
, so merging this PR before that one will result in no change in behavior.