承接 chubv/php-stl 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

chubv/php-stl

最新稳定版本:v2.1.1

Composer 安装命令:

composer require chubv/php-stl

包简介

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

README 文档

README

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

How to get it

The suggested installation method is via composer.

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

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

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

$ ./vendor/bin/phpunit

License

It's under MIT. Look at LICENSE file.

Contributing

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

统计信息

  • 总下载量: 22.69k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 21
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 21
  • Watchers: 5
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-10-31