PHPackages                             d3yii2/d3btl - 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. d3yii2/d3btl

ActiveLibrary

d3yii2/d3btl
============

library for dealing with .btl files

049PHP

Since Mar 8Pushed 4y ago4 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

d3btl
=====

[](#d3btl)

What is BTL
-----------

[](#what-is-btl)

- BTL can be used by every design software and every machine, because it's a free standard.
- BTL includes a complete description of the format and all processings.
- BTL describes parts in a machine independent geometry format.
- BTL files can be viewed and checked with our free BTL viewer.

Features
--------

[](#features)

Yii2 module. Reads BTL files created by design2machine interface and save in DB.

Realised interpreting:

- raw part
- part
- processes
    - Lap size and open sides

BTL format documentation [https://design2machine.com/btl/btl\_v106.pdf](https://design2machine.com/btl/btl_v106.pdf)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
$ composer require d3yii2/d3btl "*"

```

or add

```
"d3yii2/d3btl": "*"

```

to the `require` section of your `composer.json` file.

add to migration path

```
'class' => 'yii\console\controllers\MigrateController',
'migrationPath' => [
                    '@d3yii2/d3btl/migrations',
]
```

add to modules

```
  'modules' => [
        'btl' => [
            'class' => 'd3yii2\d3btl\Module'
        ],
  ]
```

Usage
-----

[](#usage)

command add, reads files and saves their data in database

```
php btl/process-file/add path/to/file
```

Add file by code

```
        $model = new BtlFileData();
        $model->load(['file_data' => $fileText, 'file_name' => $filename], '');
        $model->saveWithParts();
```

Get data

```
$btl = BtlFileData::findOne($btlId);
$btlPartRaw = $btl->getBtlParts()->andWhere(['type' => BtlPart::TYPE_RAWPART])->all();
$btlPartOut = $btl->getBtlParts()->andWhere(['type' => BtlPart::TYPE_PART])->all();

foreach($btlPartRaw as $pr) {
   echo $pr->getHeight() . ' ' . $pr->getWidth() . ' ' . $pr->getLength();
}

 foreach ($btlPartOut as $po) {
   foreach ($po->btlProcesses as $process) {
     if (!$lap = $process->getLap()) {
           continue;
       }

       /** bottom is open */
       if (!$lap->isP04bit5()) {
           continue;
       }

       /** top is open */
       if (!$lap->isP04bit6()) {
           continue;
       }

       $m3 = ($lap->P12/100)/1000
           * ($lap->P14/100)/1000
           * $height/1000;
       echo $m3;
    }
}
```

DB
--

[](#db)

[![data structure](doc/img.png)](doc/img.png)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor1

Top contributor holds 60.5% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/542187ba859514d10d0952dca77df8ea889a9651b249d0b5b513da791fd2919b?d=identicon)[uldisn](/maintainers/uldisn)

---

Top Contributors

[![uldisn](https://avatars.githubusercontent.com/u/3525344?v=4)](https://github.com/uldisn "uldisn (26 commits)")[![viljums](https://avatars.githubusercontent.com/u/6377908?v=4)](https://github.com/viljums "viljums (17 commits)")

### Embed Badge

![Health badge](/badges/d3yii2-d3btl/health.svg)

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

PHPackages © 2026

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