Expand description
rectangle-pack
is a library focused on laying out any number of smaller rectangles
(both 2d rectangles and 3d rectangular prisms) inside any number of larger rectangles.
Structs§
- BinSection
- A rectangular section within a target bin that takes up one or more layers
- Grouped
Rects ToPlace - Groups of rectangles that need to be placed into bins.
- Packed
Location - Describes how and where an incoming rectangle was packed into the target bins
- Rect
ToInsert - A rectangle that we want to insert into a target bin
- Rectangle
Pack Ok - Information about successfully packed rectangles.
- Target
Bin - A bin that we’d like to play our incoming rectangles into
Enums§
- Rectangle
Pack Error - An error while attempting to pack rectangles into bins.
Functions§
- contains_
smallest_ box - Select the container that has the smallest box.
- pack_
rects - Determine how to fit a set of incoming rectangles (2d or 3d) into a set of target bins.
- volume_
heuristic - The volume of the box
Type Aliases§
- BoxSize
Heuristic Fn - Incoming boxes are places into the smallest hole that will fit them.
- Compare
Potential Containers Fn - Given two sets of containers, which of these is the more suitable for our packing.