# Shrink-wrap simulation box pro

This modifier changes the simulation cell to tightly fit the particle model. It computes the axis-aligned bounding box of all particle coordinates (ignoring particle size) and replaces the original simulation cell with the new geometry.

The modifier can be useful in situations where the existing simulation cell is either too large or too small to fit the particle model. The main purpose, however, is to demonstrate the implementation of a simple user-defined modifier function in Python. Click the Edit script button in the modifier panel to see (and play with) the source code of this modifier.

Input simulation cell

Output simulation cell

See also

Source code of this modifier function