nielsiano/dmpl-builder 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

nielsiano/dmpl-builder

Composer 安装命令:

composer require nielsiano/dmpl-builder

包简介

Compile machine instructions in DM/PL format for plotters and printers.

README 文档

README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score SensioLabsInsight Total Downloads

DmplBuilder eases the process of creating DM/PL command instructions used for hardware pen plotters and cutters. Read more about the specific commands in this very modern manual by Summa.

Install

Via Composer

$ composer require nielsiano/dmpl-builder

Requirements

The following versions of PHP are supported by this version.

  • PHP 7.0

Usage

DmplBuilder uses a fluent interface to chain all commands and plots before compiling the final instructions.

$builder = new Nielsiano\DmplBuilder();

$builder->penUp()
        ->plot(200, 200)
        ->penDown()
        ->velocity(100)
        ->flexCut()
        ->plot(0, 1400)
        ->plot(1900, 0)
        ->plot(0, -1400)
        ->plot(-1900, 0)
        ->penUp()
        ->cutOff();

return $builder->compile();

Sending the generated DM/PL instructions to your plotter through USB can be done like so:

echo ';: ECM,U H L0,P0;A100,100,V10;BP50;D,0,1400,1900,0,e' > /dev/usb/lp0

Available methods at the moment:

$builder->penUp()
$builder->cutOff()
$builder->penDown()
$builder->flexCut()
$builder->flipAxes()
$builder->regularCut()
$builder->changePen(int $pen)
$builder->plot(int $x, int $y)
$builder->compile(): string
$builder->setMeasuringUnit($unit)
$builder->velocity(int $velocity)
$builder->pressure(int $gramPressure)
$builder->pushCommand(string $command)

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

$ phpunit

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email nielsstampe@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 279
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固