U-Nesting 3D
3D bin packing algorithms for the U-Nesting spatial optimization engine.
This crate provides box-based 3D packing with collision detection and various placement algorithms.
Features
- Box geometry with 6-orientation support
- Multiple placement strategies (Layer, GA, BRKGA, SA, Extreme Point)
- Mass and stacking constraints
- Configurable orientation constraints (Any, Upright, Fixed)
- Spatial indexing for fast collision queries
Quick Start
use ;
use OrientationConstraint;
// Create boxes
let box1 = new
.with_quantity
.with_orientation;
// Create container
let container = new;
// Configure and solve
let config = new
.with_strategy
.with_spacing;
let packer = new;
let result = packer.solve.unwrap;
println!;
Orientation Constraints
use ;
// Any orientation (6 rotations)
let any = new
.with_orientation;
// Upright only (2 rotations, height preserved)
let upright = new
.with_orientation;
// Fixed (no rotation)
let fixed = new
.with_orientation;
Mass Constraints
use ;
let heavy_box = new
.with_mass
.with_quantity;
let container = new
.with_max_mass;