src/STL.php
public static function fromArray(array $stlFileArray) : STL
    {
        $class = new self();

        $class->setSolidName($stlFileArray["name"]);
        foreach ($stlFileArray["facets"] as $facet) {
            $class->addFacetNormal(STLFacetNormal::fromArray($facet));
        }

        return $class;
    }
public static function fromArray(array $stlFileArray) : STL
    {
        $class = new self();

        $class->setSolidName($stlFileArray["name"]);
        foreach ($stlFileArray["facets"] as $facet) {
            $class->addFacetNormal(STLFacetNormal::fromArray($facet));
        }

        return $class;
    }
public static function fromArray ( array $ stlFileArray ) : STL { $ class = new self ( ) ; $ class -> setSolidName ( $ stlFileArray [ "name" ] ) ; foreach ( $ stlFileArray [ "facets" ] as $ facet ) { $ class -> addFacetNormal ( STLFacetNormal :: fromArray ( $ facet ) ) ; } return $ class ; }
Class constructor from an STL array.

Example STL file array: see STLTest $stlFileArray property.

@param array $stlFileArray
@return STL
Class constructor from an STL array .