php3d / stlslice
PHP 7 library for slicing each layer of an STL file
1.1
2016-08-07 11:44 UTC
Requires
- php: >=7.0
- ext-bcmath: *
- ext-gd: *
- mockery/mockery: 0.9.5
- php3d/stl: 1.0.2
- phpunit/phpunit: 5.4.6
This package is not auto-updated.
Last update: 2025-01-08 20:29:38 UTC
README
Synopsis
This library provides PHP 7 functionality for slicing STL formatted 3D objects, and converting them to SVG or GCODE.
NOTE: GCode conversion is highly experimental - change to suit your needs.
NOTE: Requires bcscale(16);
Set-up
Add this to your composer.json file:
[...] "require": { [...] "php3d/stlslice": "1.*" }
Then run composer:
composer.phar install
Examples
Extract layers:
$layers = (new \php3d\stlslice\STLSlice($stl, 10))->slice();
Convert to SVG:
See stl2svg.php
Convert to GCode (milling machine):
See stl2gcode.php