#nested #geometry #packing

babushka

bin packing and nesting library

10 releases

0.1.10 Sep 18, 2024
0.1.9 Sep 14, 2024
0.1.3 Aug 31, 2024

#1607 in Algorithms

MIT license

600KB
5K SLoC

Rust 3K SLoC // 0.1% comments C 2K SLoC // 0.1% comments

Babushka   Build Status Latest Version documentation

Babushka is a Rust library for 2D geometry algorithms, with a focus on efficient bin packing and nesting.

Features

  • 2D geometry primitives (points, segments, polygons)
  • Hierarchical primitives (piece)
  • No Fit Polygon implementation inspired by SVGNest
  • Rasterizing into Vec<u32> using the "raster" feature eg. drawing shapes with holes

nfp_0 nfp_1

Installation

Add this to your Cargo.toml:

[dependencies]

babushka = "0.1.10"

Documentation

For detailed documentation and advanced usage examples, please visit docs.rs/babushka.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Dependencies

~5–16MB
~202K SLoC