public function stabiliseLayers(): void
    {
        $stabiliser = new LayerStabiliser();
        $this->layers = $stabiliser->stabilise($this->layers);
    }
public function stabiliseLayers(): void
    {
        $stabiliser = new LayerStabiliser();
        $this->layers = $stabiliser->stabilise($this->layers);
    }
public function stabiliseLayers ( ) : void { $ stabiliser = new LayerStabiliser ( ) ; $ this -> layers = $ stabiliser -> stabilise ( $ this -> layers ) ; }
During packing, it is quite possible that layers have been created that aren't physically stable
i.e. they overhang the ones below.

This function reorders them so that the ones with the greatest surface area are placed at the bottom
During packing it is quite possible that layers have been created that aren t physically stable i . e . they overhang the ones below .