Creates a new best-fit strip packing instance.
The fixed width of the packing strip.
Gets the current total height of the packed strip.
This represents the vertical space used by all placed rectangles and is updated after each rectangle insertion.
Gets the current total width of the packed strip.
This represents the horizontal space used by all placed rectangles and is updated after each rectangle insertion.
Gets the fixed width of the strip.
This is the maximum allowable width for any rectangle to be inserted.
Inserts a rectangle into the strip at optimal position.
Finds an optimal position for the rectangle by evaluating potential placements and selecting the one that minimizes the increase to the overall packed height of the strip.
Rectangle width
Rectangle height
Placement coordinates.
Resets the instance to initial state.
Implementation of the Best-Fit Strip Packing algorithm without rotation.
This class provides a concrete implementation of the best-fit heuristic that places rectangles in their original orientation, finding the optimal placement that minimizes the overall strip height.