public function getFootprint(): int
    {
        $layerWidth = 0;
        $layerLength = 0;

        foreach ($this->items as $item) {
            $layerWidth = max($layerWidth, $item->getX() + $item->getWidth());
            $layerLength = max($layerLength, $item->getY() + $item->getLength());
        }

        return $layerWidth * $layerLength;
    }
public function getFootprint(): int
    {
        $layerWidth = 0;
        $layerLength = 0;

        foreach ($this->items as $item) {
            $layerWidth = max($layerWidth, $item->getX() + $item->getWidth());
            $layerLength = max($layerLength, $item->getY() + $item->getLength());
        }

        return $layerWidth * $layerLength;
    }
public function getFootprint ( ) : int { $ layerWidth = 0 ; $ layerLength = 0 ; foreach ( $ this -> items as $ item ) { $ layerWidth = max ( $ layerWidth , $ item -> getX ( ) + $ item -> getWidth ( ) ) ; $ layerLength = max ( $ layerLength , $ item -> getY ( ) + $ item -> getLength ( ) ) ; } return $ layerWidth * $ layerLength ; }
Calculate footprint area of this layer.

@return int mm^2
Calculate footprint area of this layer .