fgheorghe / stlslice

This library provides PHP 7 functionality for slicing STL formatted 3D objects, and converting them to SVG or GCODE.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

php3d/stlslice

Build Status

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

About

This library provides PHP 7 functionality for slicing STL formatted 3D objects, and converting them to SVG or GCODE.

License:MIT License


Languages

Language:PHP 100.0%