PHPackages                             php3d/stl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. php3d/stl

ActiveLibrary

php3d/stl
=========

STL file manipulation library for PHP 7

1.0.2(9y ago)122286[2 PRs](https://github.com/fgheorghe/php3d-stl/pulls)1MITPHPPHP &gt;=7.0

Since Jul 25Pushed 9y ago3 watchersCompare

[ Source](https://github.com/fgheorghe/php3d-stl)[ Packagist](https://packagist.org/packages/php3d/stl)[ Docs](https://github.com/)[ RSS](/packages/php3d-stl/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (1)

php3d-stl
=========

[](#php3d-stl)

[![Build Status](https://camo.githubusercontent.com/539615e03051ebd10e7a3ae5d07ff8c22def3a81c03222a07aaf48d67ab4c452/68747470733a2f2f7472617669732d63692e6f72672f666768656f726768652f70687033642d73746c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/fgheorghe/php3d-stl)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/610ed62e971e8f126cc26c472e524d96da6f6321293440a924f60a902194b5ae/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f666768656f726768652f70687033642d73746c2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/fgheorghe/php3d-stl/?branch=master)[![Build Status](https://camo.githubusercontent.com/abf943541214f7683a5caff45cc71bf1935c487d39be7acb796f78c3257b1f61/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f666768656f726768652f70687033642d73746c2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/fgheorghe/php3d-stl/build-status/master)

Synopsis
--------

[](#synopsis)

This library provides PHP 7 functionality for reading and writing from and to 3D objects stored in STereoLithography (STL) files, useful for manipulating 3D objects for 3D Printing.

Set-up
------

[](#set-up)

Add this to your composer.json file:

```
  [...]
  "require": {
      [...]
      "php3d/stl": "1.*"
  }
```

Then run composer:

```
composer.phar install
```

Examples
--------

[](#examples)

Read an STL file:

```
use php3d\stl\STL;
use php3d\stl\STLFacetNormal;

$stl = STL::fromString(file_get_contents("/path/to/file.stl"));
```

Add a new facet:

```
$stl->addFacetNormal(STLFacetNormal::fromArray(array(
    "coordinates" => array( 1, 2, 3), // Facet normal coordinates.
    "vertex" => array(
        array(
            3, 4, 5
        ),
        array(
            3, 4, 5
        ),
        array(
            3, 4, 5
        )
    )
)));
```

To split an object:

```
(new STLSplit($stl))->split();
```

Write back to file:

```
file_put_contents("/path/to/file.stl", $stl->toString());
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

3

Last Release

3573d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/33b28c71ffcf4263c2bc6a7f6c5618183bddc41d820b0d5c067295549e0e7f1e?d=identicon)[grosan.flaviu](/maintainers/grosan.flaviu)

---

Top Contributors

[![fgheorghe](https://avatars.githubusercontent.com/u/1872824?v=4)](https://github.com/fgheorghe "fgheorghe (32 commits)")

---

Tags

3dstlstereolithography3d printing

### Embed Badge

![Health badge](/badges/php3d-stl/health.svg)

```
[![Health](https://phpackages.com/badges/php3d-stl/health.svg)](https://phpackages.com/packages/php3d-stl)
```

###  Alternatives

[chubv/php-stl

Library to parse STL file and get some statistics of the model

2123.1k](/packages/chubv-php-stl)[libre3d/render-3d

Wrapper library to help render preview images for common 3D file formats.

331.4k](/packages/libre3d-render-3d)[payconn/common

Payconn payment processing library for PHP

132.0k6](/packages/payconn-common)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
