PHPackages                             chubv/php-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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. chubv/php-stl

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

chubv/php-stl
=============

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

v2.1.1(3y ago)2123.1k8[4 PRs](https://github.com/ChubV/php-stl/pulls)MITPHPPHP ^7.3 || ^8.0

Since May 6Pushed 3y ago5 watchersCompare

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

READMEChangelogDependencies (4)Versions (9)Used By (0)

STL PHP
=======

[](#stl-php)

This repository contains code for handling 3D models saved in STL format.

How to get it
-------------

[](#how-to-get-it)

The suggested installation method is via [composer](https://getcomposer.org/).

Add a dependency on `chubv/php-stl` to your project's `composer.json` file.

Usage
-----

[](#usage)

To get the model build the `Reader` and read the model from file

`$model = STLReader::forFile(__DIR__ . '/stls/text.stl')->readModel();`

You can use `VolumeHandler` to calculate volume of 3D model without `STLModel` object construction (memory consumption is proportional to model size) or write your own handler by implementing `HandlerInterface` and setting it to reader.

```
    $reader = STLReader::forFile(__DIR__ . '/stls/text.stl');
    $reader->setHandler(new VolumeHandler());
    $volume = $reader->readModel();
```

Tests
-----

[](#tests)

The PHPUnit version to be used is the one installed as a dev- dependency via composer:

```
$ ./vendor/bin/phpunit
```

License
-------

[](#license)

It's under MIT. Look at LICENSE file.

Contributing
------------

[](#contributing)

Feel free to make pull requests or create issues. You can also contact me via e-mail v\[at\]chub.com.ua

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~188 days

Total

4

Last Release

1273d ago

Major Versions

v1.0.0 → v2.0.02021-05-06

PHP version history (2 changes)v1.0.0PHP &gt;=5.4.0

v2.0.0PHP ^7.3 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3e2118b9805c85d2382e501a0a0008f705518761e97c0fd6362221d82a9df173?d=identicon)[Chub](/maintainers/Chub)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![ChubV](https://avatars.githubusercontent.com/u/2264412?v=4)](https://github.com/ChubV "ChubV (5 commits)")[![MGatner](https://avatars.githubusercontent.com/u/17572847?v=4)](https://github.com/MGatner "MGatner (3 commits)")[![Fuzzyma](https://avatars.githubusercontent.com/u/3540542?v=4)](https://github.com/Fuzzyma "Fuzzyma (1 commits)")[![mikastamm](https://avatars.githubusercontent.com/u/32865775?v=4)](https://github.com/mikastamm "mikastamm (1 commits)")

---

Tags

volume3dstl

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[hassankhan/config

Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files

97513.5M170](/packages/hassankhan-config)[meyfa/php-svg

Read, edit, write, and render SVG files with PHP

54613.9M42](/packages/meyfa-php-svg)

PHPackages © 2026

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