3d-bin-container-packing
3d-bin-container-packing copied to clipboard
If there is no match, then return the result instead of null
Hey! Thanks for the library!
If there are no matches, then it would be useful to get a not-null result with the following information about each container:
- List of boxes that were placed in the container.
- List of boxes that could not be placed in the container.
I, as a cargo carrier, can first send the first batch of boxes that fit into the container, and then the second batch of boxes in another container.
@4ybakut2004 so the packager.packList(..)
method(s) do not work?
@4ybakut2004 so the
packager.packList(..)
method(s) do not work?
@skjolber, my Issue is about the return value. The packager.packList
method returns null
, but null
cannot be used to determine why the error occurred. For example, if the box is larger than the container or the number of containers is too small to fit all boxes, then the method returns null
. However, it would be useful to return a not-null result such as structure with containers and unfitted boxes like:
class Result(
val containers: List<Container>,
val unfittedItems: List<StackableItem>
)
Right, it would be possible to capture the state when the packager gives up, and capture boxes which are too heavy or too big for any container, ++.
@4ybakut2004 reviewing this issue, I do not understand why the packList
is no good - what will become of the unfitted items?