public function getDepth(): int
    {
        $layerDepth = 0;

        foreach ($this->items as $item) {
            $layerDepth = max($layerDepth, $item->getZ() + $item->getDepth());
        }

        return $layerDepth - $this->getStartDepth();
    }
public function getDepth(): int
    {
        $layerDepth = 0;

        foreach ($this->items as $item) {
            $layerDepth = max($layerDepth, $item->getZ() + $item->getDepth());
        }

        return $layerDepth - $this->getStartDepth();
    }
public function getDepth ( ) : int { $ layerDepth = 0 ; foreach ( $ this -> items as $ item ) { $ layerDepth = max ( $ layerDepth , $ item -> getZ ( ) + $ item -> getDepth ( ) ) ; } return $ layerDepth - $ this -> getStartDepth ( ) ; }
Calculate depth of this layer.

@return int mm
Calculate depth of this layer .