Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Scala library for two-dimensional packing


TwoBinKernel is the very heart of TwoBinPack, providing a shared model and a set of utilities to deal with two-dimensional packing problems.

It is a Scala library, inspired by Functional Programming (especially Elm, Erlang and Haskell) but still maintaining a hybrid OOP-FP nature.

Last but not least, you can even employ it to introduce TwoBinPack's model into your own applications!


Scala 2.11.8 or later and Java 8u101 or later are recommended to employ TwoBinKernel.

Referencing the library

TwoBinKernel is available on Hephaestus and can be declared as a Gradle or Maven dependency; please refer to its dedicated page.

Alternatively, you could download the JAR file from Hephaestus and manually add it to your project structure.

Finally, TwoBinKernel is also a standard OSGi bundle which you can employ in your OSGi architectures! ^__^

Core concepts

TwoBinKernel's root package is info.gianlucacosta.twobinpack, having a few notable subpackages:

  • core: essential concepts such as Problem and Solution

  • io: shared I/O utilities - for example, to read/write model entities from/to files

  • rendering: ScalaFX controls for rendering problems and solutions. The most important classes are Frame, AxesPane and BlockGalleryPane

For further information, please consult the library's Scaladoc.

Further references

You can’t perform that action at this time.